Package org.apache.rave.portal.model

Examples of org.apache.rave.portal.model.MongoDbGroup


        return Group.class;
    }

    @Override
    public MongoDbGroup convert(Group source) {
        MongoDbGroup group = new MongoDbGroup();
        group.setId(source.getId() == null ? generateId() : source.getId());
        group.setTitle(source.getTitle());
        group.setOwnerId(source.getOwnerId());
        group.setDescription(source.getDescription());
        group.setMemberIds(source.getMemberIds());

        return group;
    }
View Full Code Here


    }


    @Test
    public void hydrate_valid(){
        MongoDbGroup category = new MongoDbGroup();

        converter.hydrate(category);
    }
View Full Code Here

        group.setTitle("asdf");
        group.setDescription("Description");
        group.setMemberIds(Arrays.asList(new String[] {"1", "2", "3"}));
        group.setOwnerId(USER2ID);

        MongoDbGroup mongoGroup = converter.convert(group);
        assertThat(mongoGroup.getId(), is(equalTo(USER1ID)));
        assertThat(mongoGroup.getTitle(), is(equalTo("asdf")));
        assertThat(mongoGroup.getDescription(), is("Description"));
        assertThat(mongoGroup.getMemberIds().size(), is(3));
        assertThat(mongoGroup.getOwnerId(), is(USER2ID));

    }//end convert_valid
View Full Code Here

    @Test
    public void convert_Null(){
        Group source = new GroupImpl();

        MongoDbGroup converted = converter.convert(source);

        assertNull(converted.getTitle());
        assertNull(converted.getDescription());
        assertNotNull(converted.getId());
    }
View Full Code Here

TOP

Related Classes of org.apache.rave.portal.model.MongoDbGroup

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.