Package org.eurekastreams.server.domain

Examples of org.eurekastreams.server.domain.DomainGroup


     * Test deleting a group.
     */
    @Test(expected = NoResultException.class)
    public void testDelete()
    {
        DomainGroup group = jpaGroupMapper.findById(2L);
        assertNotNull(group);

        jpaGroupMapper.deleteById(2L);

        jpaGroupMapper.findById(2);
View Full Code Here


     * Test objectToString when passed a pending group.
     */
    @Test
    public void testObjectToStringPending()
    {
        DomainGroup group = new DomainGroup();
        group.setPending(true);
        assertEquals("f", sut.objectToString(group));
    }
View Full Code Here

     * Test objectToString when passed a normal group.
     */
    @Test
    public void testObjectToStringNormal()
    {
        DomainGroup group = new DomainGroup();
        group.setPending(false);
        assertEquals("t", sut.objectToString(group));
    }
View Full Code Here

    @Test(expected = ValidationException.class)
    public void persistFailedDupGroup() throws Exception
    {
        final Set<Person> coordinators = new HashSet<Person>();
        coordinators.add(new Person("id2", "Homer", "Jay", "Simpson", "Homey"));
        final DomainGroup dupGroup = context.mock(DomainGroup.class, "dupGroup");
        final long id = 1L;
        String newName = "NEW org name here";

        final HashMap<String, Serializable> formData = new HashMap<String, Serializable>();
        formData.put("id", Long.toString(id));
View Full Code Here

     */
    @Test(expected = ValidationException.class)
    public void persistFailedCoordinators() throws Exception
    {

        final DomainGroup dupGroup = context.mock(DomainGroup.class, "dupGroup");
        final Set<Person> coordinators = new HashSet<Person>();

        final long id = 1L;
        String newName = "NEW org name here";

View Full Code Here

    public void performActionWithFullFormWithExistingCoordinators() throws Exception
    {
        final String name = "org name here";
        final long id = 1L;
        String newName = "NEW org name here";
        final DomainGroup newGroup = new DomainGroup();
        final Person coordinatorMock = context.mock(Person.class);

        final HashMap<String, Serializable> formData = new HashMap<String, Serializable>();
        formData.put("id", Long.toString(id));
        formData.put("name", newName);
View Full Code Here

    public void performActionWithFullFormWithNonExistingCoordinators() throws Exception
    {
        final String name = "org name here";
        final long id = 1L;
        String newName = "NEW org name here";
        final DomainGroup newGroup = new DomainGroup();
        final Person coordinatorMock = context.mock(Person.class);

        final HashMap<String, Serializable> formData = new HashMap<String, Serializable>();
        formData.put("id", Long.toString(id));
        formData.put("name", newName);
View Full Code Here

                .setParameter("followingId", followingId).executeUpdate();

        getEntityManager().flush();
        getEntityManager().clear();

        DomainGroup followingEntity = findById(followingId);

        // reindex the following in the search index
        getFullTextSession().index(followingEntity);
    }
View Full Code Here

                .setParameter("followingId", followingId).executeUpdate();

        getEntityManager().flush();
        getEntityManager().clear();

        DomainGroup followingEntity = findById(followingId);

        // reindex the following in the search index
        getFullTextSession().index(followingEntity);
    }
View Full Code Here

     * @param followingId
     *            The group id being Followed.
     */
    public void removeGroupCoordinator(final long followerId, final long followingId)
    {
        DomainGroup followingEntity = findById(followingId);

        Set<Person> groupCoordinators = followingEntity.getCoordinators();

        removeGroupCoordinator(groupCoordinators, followerId, followingId);

        followingEntity.setCoordinators(groupCoordinators);

        getEntityManager().flush();
    }
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.domain.DomainGroup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.