Package de.novanic.eventservice.test.testhelper

Examples of de.novanic.eventservice.test.testhelper.EventFilterTestMode


        assertNull(myEventRegistry.getEventFilter(TEST_DOMAIN, "noKnownUser"));
    }

    @Test
    public void testRemoveEventFilter() {
        myEventRegistry.registerUser(TEST_DOMAIN, TEST_USER_ID, new EventFilterTestMode());
        checkLog(2, "User \"test_user_id\" registered for domain \"test_domain\".",
                "test_user_id: EventFilter changed for domain \"test_domain\".");

        myEventRegistry.registerUser(TEST_DOMAIN_2, TEST_USER_ID, new EventFilterTestMode());
        checkLog(4, "User \"test_user_id\" registered for domain \"test_domain_2\".",
                "test_user_id: EventFilter changed for domain \"test_domain_2\".");

        myEventRegistry.removeEventFilter(TEST_DOMAIN_2, TEST_USER_ID);
        checkLog(5, "test_user_id: EventFilter removed from domain \"test_domain_2\".");
View Full Code Here


    public void testRegisterUser_2() {
        assertFalse(myEventRegistry.isUserRegistered(TEST_USER_ID));
        assertFalse(myEventRegistry.isUserRegistered(TEST_DOMAIN, TEST_USER_ID));
        assertTrue(myEventRegistry.getListenDomains(TEST_USER_ID).isEmpty());

        myEventRegistry.registerUser(TEST_DOMAIN, TEST_USER_ID, new EventFilterTestMode());
        checkLog(2, "User \"test_user_id\" registered for domain \"test_domain\".",
                "test_user_id: EventFilter changed for domain \"test_domain\".");

        assertTrue(myEventRegistry.isUserRegistered(TEST_USER_ID));
        assertTrue(myEventRegistry.isUserRegistered(TEST_DOMAIN, TEST_USER_ID));
View Full Code Here

    public void testIsUserRegistered() {
        assertFalse(myEventRegistry.isUserRegistered(TEST_USER_ID));
        assertFalse(myEventRegistry.isUserRegistered(TEST_DOMAIN, TEST_USER_ID));
        assertTrue(myEventRegistry.getListenDomains(TEST_USER_ID).isEmpty());

        myEventRegistry.registerUser(TEST_DOMAIN, TEST_USER_ID, new EventFilterTestMode());
        checkLog(2, "User \"test_user_id\" registered for domain \"test_domain\".",
                "test_user_id: EventFilter changed for domain \"test_domain\".");

        assertTrue(myEventRegistry.isUserRegistered(TEST_USER_ID));
        assertTrue(myEventRegistry.isUserRegistered(TEST_DOMAIN, TEST_USER_ID));
View Full Code Here

        assertFalse(myEventRegistry.isUserRegistered(TEST_USER_ID));
        assertFalse(myEventRegistry.isUserRegistered(TEST_DOMAIN, TEST_USER_ID));
        assertTrue(myEventRegistry.getListenDomains(TEST_USER_ID).isEmpty());
        assertNull(myEventRegistry.getEventFilter(TEST_DOMAIN, TEST_USER_ID));

        myEventRegistry.registerUser(TEST_DOMAIN, TEST_USER_ID, new EventFilterTestMode());
        checkLog(2, "User \"test_user_id\" registered for domain \"test_domain\".",
                "test_user_id: EventFilter changed for domain \"test_domain\".");

        assertTrue(myEventRegistry.isUserRegistered(TEST_USER_ID));
        assertTrue(myEventRegistry.isUserRegistered(TEST_DOMAIN, TEST_USER_ID));
View Full Code Here

    @Test
    public void testSetEventFilter() {
        assertNull(myUserInfo.getEventFilter(TEST_DOMAIN));
        assertNull(myUserInfo.getEventFilter(DomainFactory.getDomain("otherDomain")));

        final EventFilterTestMode theTestEventFilter = new EventFilterTestMode();
        myUserInfo.setEventFilter(TEST_DOMAIN, theTestEventFilter);
        assertNotNull(myUserInfo.getEventFilter(TEST_DOMAIN));
        assertEquals(theTestEventFilter, myUserInfo.getEventFilter(TEST_DOMAIN));
       
        assertNull(myUserInfo.getEventFilter(DomainFactory.getDomain("otherDomain")));
View Full Code Here

    @Test
    public void testSetEventFilter_2() {
        assertNull(myUserInfo.getEventFilter(TEST_DOMAIN));
        assertNull(myUserInfo.getEventFilter(DomainFactory.getDomain("otherDomain")));

        final EventFilterTestMode theTestEventFilter = new EventFilterTestMode();
        myUserInfo.setEventFilter(TEST_DOMAIN, theTestEventFilter);
        assertNotNull(myUserInfo.getEventFilter(TEST_DOMAIN));
        assertEquals(theTestEventFilter, myUserInfo.getEventFilter(TEST_DOMAIN));

        final EventFilterTestMode theTestEventFilter_2 = new EventFilterTestMode();
        myUserInfo.setEventFilter(TEST_DOMAIN, theTestEventFilter_2);
        assertNotNull(myUserInfo.getEventFilter(TEST_DOMAIN));
        assertEquals(theTestEventFilter_2, myUserInfo.getEventFilter(TEST_DOMAIN));
        assertFalse(theTestEventFilter.equals(myUserInfo.getEventFilter(TEST_DOMAIN)));
View Full Code Here

    @Test
    public void testRemoveEventFilter() {
        assertNull(myUserInfo.getEventFilter(TEST_DOMAIN));

        final EventFilterTestMode theTestEventFilter = new EventFilterTestMode();
        myUserInfo.setEventFilter(TEST_DOMAIN, theTestEventFilter);
        assertNotNull(myUserInfo.getEventFilter(TEST_DOMAIN));
        assertEquals(theTestEventFilter, myUserInfo.getEventFilter(TEST_DOMAIN));

        myUserInfo.removeEventFilter(TEST_DOMAIN);
View Full Code Here

TOP

Related Classes of de.novanic.eventservice.test.testhelper.EventFilterTestMode

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.