Package org.eurekastreams.server.search.modelview

Examples of org.eurekastreams.server.search.modelview.DomainGroupModelView


        cal.add(Calendar.HOUR, -1);
        Date earlier = cal.getTime();

        PersonModelView pmv = new PersonModelView(1L, "persona", "Person", "A", "hey now", "", 40, earlier, 7L);
        DomainGroupModelView gmv = new DomainGroupModelView(1L, "groupb", "Group B", 50L, newer, 8L);

        Assert.assertTrue(sut.compare(pmv, gmv) > 0);
        Assert.assertTrue(sut.compare(gmv, pmv) < 0);
    }
View Full Code Here


                new ArrayList<GalleryTabTemplateDTO>(0));
        final PagedSet<Theme> themes = new PagedSet<Theme>(0, 50, 0, new ArrayList<Theme>(0));
        final List<ThemeDTO> themeDTOs = new ArrayList<ThemeDTO>(0);

        final List<DomainGroupModelView> groups = new ArrayList<DomainGroupModelView>();
        groups.add(new DomainGroupModelView());
       
        context.checking(new Expectations()
        {
            {
                oneOf(systemSettingDAO).execute(null);
View Full Code Here

     * Test buildModelView().
     */
    @Test
    public void testBuildModelView()
    {
        DomainGroupModelView modelView = new DomainGroupModelViewFactory().buildModelView();
        assertNotNull(modelView);
    }
View Full Code Here

        maps.add(buildMap(Person.class, 1L));
        maps.add(buildMap(DomainGroup.class, 1L));

        // ModelViews that the mocked mappers will return - numbers describe their order
        final ModelView person2 = buildModelView(new PersonModelView(), 3L);
        final ModelView group4 = buildModelView(new DomainGroupModelView(), 9L);
        final ModelView person5 = buildModelView(new PersonModelView(), 1L);
        final ModelView group7 = buildModelView(new DomainGroupModelView(), 1L);

        // the list of Group IDs we expect to be sent to the group mapper
        final List<Long> expectedGroupIdList = new ArrayList<Long>();
        expectedGroupIdList.add(9L);
        expectedGroupIdList.add(1L);
View Full Code Here

     */
    @Before
    public final void setUp()
    {
        sut = new GetCurrentUserFollowedGroupsExecution(idMapper, groupMapper, peopleMapper, groupPermissionsChecker);
        group1 = new DomainGroupModelView();
        group2 = new DomainGroupModelView();
        group3 = new DomainGroupModelView();

        group1.setEntityId(1);
        group2.setEntityId(2);
        group3.setEntityId(3);

View Full Code Here

    public void testAuthorizeAddFollowerPrivateGroup()
    {
        final SetFollowingStatusRequest request = new SetFollowingStatusRequest("1", "1", EntityType.GROUP, false,
                Follower.FollowerStatus.FOLLOWING);

        final DomainGroupModelView testGroup = new DomainGroupModelView();
        testGroup.setIsPublic(false);
        testGroup.setEntityId(1L);

        final Set<Long> groupCoordIds = new HashSet<Long>();
        groupCoordIds.add(1L);

        context.checking(new Expectations()
View Full Code Here

    public void testAuthorizeAddFollowerPrivateGroupNotCoordinator()
    {
        final SetFollowingStatusRequest request = new SetFollowingStatusRequest("1", "1", EntityType.GROUP, false,
                Follower.FollowerStatus.FOLLOWING);

        final DomainGroupModelView testGroup = new DomainGroupModelView();
        testGroup.setIsPublic(false);
        testGroup.setEntityId(1L);

        final Set<Long> groupCoordIds = new HashSet<Long>();
        groupCoordIds.add(1L);

        context.checking(new Expectations()
View Full Code Here

    public void testAuthorizeAddFollowerPublicGroup()
    {
        final SetFollowingStatusRequest request = new SetFollowingStatusRequest("1", "1", EntityType.GROUP, false,
                Follower.FollowerStatus.FOLLOWING);

        final DomainGroupModelView testGroup = new DomainGroupModelView();
        testGroup.setIsPublic(true);
        testGroup.setEntityId(1L);

        context.checking(new Expectations()
        {
            {
                oneOf(groupMapperMock).fetchUniqueResult(with(any(String.class)));
View Full Code Here

    public void testAuthorizeRemoveFollowerPrivateGroup()
    {
        final SetFollowingStatusRequest request = new SetFollowingStatusRequest("1", "1", EntityType.GROUP, false,
                Follower.FollowerStatus.NOTFOLLOWING);

        final DomainGroupModelView testGroup = new DomainGroupModelView();
        testGroup.setIsPublic(false);
        testGroup.setEntityId(1L);

        final Set<Long> groupCoordIds = new HashSet<Long>();
        groupCoordIds.add(1L);

        context.checking(new Expectations()
View Full Code Here

    public void testAuthorizeRemoveFollowerPrivateGroupNotCoordinator()
    {
        final SetFollowingStatusRequest request = new SetFollowingStatusRequest("1", "1", EntityType.GROUP, false,
                Follower.FollowerStatus.NOTFOLLOWING);

        final DomainGroupModelView testGroup = new DomainGroupModelView();
        testGroup.setIsPublic(false);
        testGroup.setEntityId(1L);

        final Set<Long> groupCoordIds = new HashSet<Long>();
        groupCoordIds.add(2L);

        context.checking(new Expectations()
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.search.modelview.DomainGroupModelView

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.