Package org.eurekastreams.server.persistence.mappers.requests

Examples of org.eurekastreams.server.persistence.mappers.requests.ChangeStreamActivitySubscriptionMapperRequest


     * Test success when should receive notifications.
     */
    @Test
    public void testSuccessOnYesUnrestricted()
    {
        final ChangeStreamActivitySubscriptionMapperRequest expected = // \n
        new ChangeStreamActivitySubscriptionMapperRequest(PERSON_ID, STREAM_ENTITY_ID, true, false);

        context.checking(new Expectations()
        {
            {
                allowing(entityIdFromUniqueIdDAO).execute(STREAM_ENTITY_UNIQUE_ID);
View Full Code Here


     * Test success when should receive notifications.
     */
    @Test
    public void testSuccessOnYesRestricted()
    {
        final ChangeStreamActivitySubscriptionMapperRequest expected = // \n
        new ChangeStreamActivitySubscriptionMapperRequest(PERSON_ID, STREAM_ENTITY_ID, true, true);

        context.checking(new Expectations()
        {
            {
                allowing(entityIdFromUniqueIdDAO).execute(STREAM_ENTITY_UNIQUE_ID);
View Full Code Here

     * Test success when should not receive notifications.
     */
    @Test
    public void testSuccessOnNo()
    {
        final ChangeStreamActivitySubscriptionMapperRequest expected = // \n
        new ChangeStreamActivitySubscriptionMapperRequest(PERSON_ID, STREAM_ENTITY_ID, false, false);

        context.checking(new Expectations()
        {
            {
                allowing(entityIdFromUniqueIdDAO).execute(STREAM_ENTITY_UNIQUE_ID);
View Full Code Here

        assertTrue(getSubscription("GroupFollower", userId, groupId));
        getEntityManager().clear();

        sut = new ChangeStreamActivitySubscriptionDbMapper(EntityType.GROUP);
        ((BaseDomainMapper) sut).setEntityManager(getEntityManager());
        sut.execute(new ChangeStreamActivitySubscriptionMapperRequest(userId, groupId, false, true));

        getEntityManager().clear();
        assertFalse(getSubscription("GroupFollower", userId, groupId));
        assertFalse(getCoordOnly("GroupFollower", userId, groupId));
    }
View Full Code Here

        assertTrue(getSubscription("GroupFollower", userId, groupId));
        getEntityManager().clear();

        sut = new ChangeStreamActivitySubscriptionDbMapper(EntityType.GROUP);
        ((BaseDomainMapper) sut).setEntityManager(getEntityManager());
        sut.execute(new ChangeStreamActivitySubscriptionMapperRequest(userId, groupId, false, false));

        getEntityManager().clear();
        assertFalse(getSubscription("GroupFollower", userId, groupId));
        assertFalse(getCoordOnly("GroupFollower", userId, groupId));
    }
View Full Code Here

        assertFalse(getSubscription("GroupFollower", userId, groupId));
        getEntityManager().clear();

        sut = new ChangeStreamActivitySubscriptionDbMapper(EntityType.GROUP);
        ((BaseDomainMapper) sut).setEntityManager(getEntityManager());
        sut.execute(new ChangeStreamActivitySubscriptionMapperRequest(userId, groupId, true, false));

        getEntityManager().clear();
        assertTrue(getSubscription("GroupFollower", userId, groupId));
        assertFalse(getCoordOnly("GroupFollower", userId, groupId));
    }
View Full Code Here

        assertFalse(getSubscription("GroupFollower", userId, groupId));
        getEntityManager().clear();

        sut = new ChangeStreamActivitySubscriptionDbMapper(EntityType.GROUP);
        ((BaseDomainMapper) sut).setEntityManager(getEntityManager());
        sut.execute(new ChangeStreamActivitySubscriptionMapperRequest(userId, groupId, true, true));

        getEntityManager().clear();
        assertTrue(getSubscription("GroupFollower", userId, groupId));
        assertTrue(getCoordOnly("GroupFollower", userId, groupId));
    }
View Full Code Here

        assertEquals(0, getFollowingCount("GroupFollower", userId, groupId));
        getEntityManager().clear();

        sut = new ChangeStreamActivitySubscriptionDbMapper(EntityType.GROUP);
        ((BaseDomainMapper) sut).setEntityManager(getEntityManager());
        sut.execute(new ChangeStreamActivitySubscriptionMapperRequest(userId, groupId, true, false));

        getEntityManager().clear();
        assertEquals(0, getFollowingCount("GroupFollower", userId, groupId));
    }
View Full Code Here

        assertTrue(getSubscription("Follower", userId, personId));
        getEntityManager().clear();

        sut = new ChangeStreamActivitySubscriptionDbMapper(EntityType.PERSON);
        ((BaseDomainMapper) sut).setEntityManager(getEntityManager());
        sut.execute(new ChangeStreamActivitySubscriptionMapperRequest(userId, personId, false, false));

        getEntityManager().clear();
        assertFalse(getSubscription("Follower", userId, personId));
    }
View Full Code Here

        assertFalse(getSubscription("Follower", userId, personId));
        getEntityManager().clear();

        sut = new ChangeStreamActivitySubscriptionDbMapper(EntityType.PERSON);
        ((BaseDomainMapper) sut).setEntityManager(getEntityManager());
        sut.execute(new ChangeStreamActivitySubscriptionMapperRequest(userId, personId, true, false));

        getEntityManager().clear();
        assertTrue(getSubscription("Follower", userId, personId));
    }
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.persistence.mappers.requests.ChangeStreamActivitySubscriptionMapperRequest

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.