Package de.novanic.eventservice.test.testhelper

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


        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


        assertFalse(myEventRegistry.isUserRegistered(TEST_USER_ID));
        assertFalse(myEventRegistry.isUserRegistered(TEST_DOMAIN, TEST_USER_ID));
        assertFalse(myEventRegistry.isUserRegistered(DomainFactory.USER_SPECIFIC_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\".");
        assertNotNull(myEventRegistry.getEventFilter(TEST_DOMAIN, TEST_USER_ID));

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

    @Test
    public void testListen_EventFilter() throws Exception {
        assertNull(myEventRegistry.getEventFilter(TEST_DOMAIN, TEST_USER_ID));

        myEventRegistry.registerUser(TEST_DOMAIN, TEST_USER_ID, new EventFilterTestMode());
        startAddEvent(TEST_DOMAIN, 100);
        startAddEvent(TEST_DOMAIN, 200);
        startAddEvent(TEST_DOMAIN, 300);
        startAddEvent(TEST_DOMAIN, 400);
        int theResult = myEventRegistry.listen(getLongPollingListener(), TEST_USER_ID).size();
View Full Code Here

    @Test
    public void testListen_EventFilter_2() throws Exception {
        assertNull(myEventRegistry.getEventFilter(TEST_DOMAIN, TEST_USER_ID));

        myEventRegistry.registerUser(TEST_DOMAIN, TEST_USER_ID, new EventFilterTestMode());
        startAddEvent(TEST_DOMAIN, 100);
        startAddEvent(TEST_DOMAIN, 200);
        startAddEvent(TEST_DOMAIN, 300);
        startAddEvent(TEST_DOMAIN, 400);
        int theResult = myEventRegistry.listen(getLongPollingListener(), TEST_USER_ID).size();
View Full Code Here

    @Test
    public void testListen_EventFilter_3() throws Exception {
        assertNull(myEventRegistry.getEventFilter(TEST_DOMAIN, TEST_USER_ID));

        myEventRegistry.registerUser(TEST_DOMAIN, TEST_USER_ID, new EventFilterTestMode());
        startAddEvent(TEST_DOMAIN, 100);
        startAddEvent(TEST_DOMAIN, 200);
        startAddEvent(TEST_DOMAIN, 300);
        startAddEvent(TEST_DOMAIN, 400);
        int theResult = myEventRegistry.listen(getLongPollingListener(), TEST_USER_ID).size();
View Full Code Here

    @Test
    public void testListen_EventFilter_4() throws Exception {
        assertNull(myEventRegistry.getEventFilter(TEST_DOMAIN, TEST_USER_ID));

        myEventRegistry.registerUser(TEST_DOMAIN, TEST_USER_ID, new EventFilterTestMode());
        startAddEvent(TEST_DOMAIN, 100);
        startAddEvent(TEST_DOMAIN, 200);
        startAddEvent(TEST_DOMAIN, 300);
        startAddEvent(TEST_DOMAIN, 400);
        int theResult = myEventRegistry.listen(getLongPollingListener(), TEST_USER_ID).size();
View Full Code Here

    public void testChangeEventFilter() {
        myEventRegistry.registerUser(TEST_DOMAIN, TEST_USER_ID, null);
        checkLog(1, "User \"test_user_id\" registered for domain \"test_domain\".");

        assertNull(myEventRegistry.getEventFilter(TEST_DOMAIN, TEST_USER_ID));
        myEventRegistry.setEventFilter(TEST_DOMAIN, TEST_USER_ID, new EventFilterTestMode());
        checkLog(2, "test_user_id: EventFilter changed for domain \"test_domain\".");
        assertNotNull(myEventRegistry.getEventFilter(TEST_DOMAIN, TEST_USER_ID));

        myEventRegistry.setEventFilter(TEST_DOMAIN, TEST_USER_ID, null);
        checkLog(3, "test_user_id: EventFilter removed from domain \"test_domain\".");
View Full Code Here

        assertNull(myEventRegistry.getEventFilter(TEST_DOMAIN, TEST_USER_ID));
    }

    @Test
    public void testChangeEventFilter_2() {
        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\".");

        assertNotNull(myEventRegistry.getEventFilter(TEST_DOMAIN, TEST_USER_ID));
        myEventRegistry.setEventFilter(TEST_DOMAIN, TEST_USER_ID, null);
View Full Code Here

    }

    @Test
    public void testChangeEventFilter_Error() {
        assertNull(myEventRegistry.getEventFilter(TEST_DOMAIN, "noKnownUser"));
        myEventRegistry.setEventFilter(TEST_DOMAIN, "noKnownUser", new EventFilterTestMode());
        checkLog(0);
        assertNull(myEventRegistry.getEventFilter(TEST_DOMAIN, "noKnownUser"));
    }
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.