Package org.eurekastreams.server.persistence.mappers.db.notification

Examples of org.eurekastreams.server.persistence.mappers.db.notification.ChangeStreamActivitySubscriptionDbMapper


     * Tests attempting to create for unsupported type.
     */
    @Test(expected = Exception.class)
    public void testConstructInvalidType()
    {
        new ChangeStreamActivitySubscriptionDbMapper(EntityType.RESOURCE);
    }
View Full Code Here


        final long groupId = 1L;

        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));
View Full Code Here

        final long groupId = 1L;

        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));
View Full Code Here

        final long groupId = 1L;

        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));
View Full Code Here

        final long groupId = 1L;

        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));
View Full Code Here

        final long groupId = 1L;

        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

        final long personId = 98L;

        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

        final long personId = 98L;

        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

        final long personId = 42L;

        assertEquals(0, getFollowingCount("Follower", userId, personId));
        getEntityManager().clear();

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

        getEntityManager().clear();
        assertEquals(0, getFollowingCount("Follower", userId, personId));
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.persistence.mappers.db.notification.ChangeStreamActivitySubscriptionDbMapper

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.