Package de.novanic.eventservice.client.event.domain

Examples of de.novanic.eventservice.client.event.domain.Domain


        joinThreads();

        assertEquals(theUserCount, theUsers.size());
        for(Map.Entry<String, Domain> theUserEntry: theUsers.entrySet()) {
            String theUserId = theUserEntry.getKey();
            Domain theUserDomain = theUserEntry.getValue();

            assertTrue(myEventRegistry.isUserRegistered(theUserId));
            assertTrue(myEventRegistry.isUserRegistered(theUserDomain, theUserId));
            assertFalse(myEventRegistry.isUserRegistered(TEST_DOMAIN_3, theUserId));
View Full Code Here


        assertSame(theEvent, theEvents.get(0).getEvent());
    }

    @Test
    public void testAddEvent_WithoutSession() throws Exception {
        final Domain theDomain = DomainFactory.getDomain("X");
        final String theUserId = "test_user";
        final Event theEvent = new Event() {};

        EventRegistry theEventRegistry = EventRegistryFactory.getInstance().getEventRegistry();
        theEventRegistry.registerUser(theDomain, theUserId, null);
View Full Code Here

        assertSame(theEvent, theEvents.get(0).getEvent());
    }

    @Test
    public void testAddEventUserSpecific_WithoutSession() throws Exception {
        final Domain theDomain = DomainFactory.getDomain("X");
        final String theUserId = "test_user";
        final Event theEvent = new Event() {};

        EventRegistry theEventRegistry = EventRegistryFactory.getInstance().getEventRegistry();
        theEventRegistry.registerUser(theDomain, theUserId, null);
View Full Code Here

@RunWith(JUnit4.class)
public class DeactivationCommandTest extends ClientCommandTestCase
{
    @Test
    public void testExecute() {
        final Domain theTestDomain = DomainFactory.getDomain("test_domain");

        getRemoteEventConnectorMock().deactivate(theTestDomain, getCommandCallback());

        testExecute(new DeactivationCommand(getRemoteEventConnectorMock(), theTestDomain, getCommandCallback()));
    }
View Full Code Here

        testExecute(new DeactivationCommand(getRemoteEventConnectorMock(), theTestDomain, getCommandCallback()));
    }

    @Test
    public void testExecute_2() {
        final Domain theTestDomain = DomainFactory.getDomain("test_domain");
        final Set<Domain> theDomains = new HashSet<Domain>(1);
        theDomains.add(theTestDomain);

        getRemoteEventConnectorMock().deactivate(theDomains, getCommandCallback());
View Full Code Here

@RunWith(JUnit4.class)
public class EventExecutionCommandTest extends ClientCommandTestCase
{
    @Test
    public void testExecute() {
        final Domain theTestDomain = DomainFactory.getDomain("test_domain");
        final Event theTestEvent = new DummyEvent();

        getRemoteEventConnectorMock().sendEvent(theTestDomain, theTestEvent, getCommandCallback());

        testExecute(new EventExecutionCommand(getRemoteEventConnectorMock(), theTestDomain, theTestEvent, getCommandCallback()));
View Full Code Here

        testExecute(new EventExecutionCommand(getRemoteEventConnectorMock(), theTestDomain, theTestEvent, getCommandCallback()));
    }

    @Test
    public void testExecute_2() {
        final Domain theUserSpecificDomain = DomainFactory.USER_SPECIFIC_DOMAIN;
        final Event theTestEvent = new DummyEvent();

        getRemoteEventConnectorMock().sendEvent(theUserSpecificDomain, theTestEvent, getCommandCallback());

        testExecute(new EventExecutionCommand(getRemoteEventConnectorMock(), theUserSpecificDomain, theTestEvent, getCommandCallback()));
View Full Code Here

        assertEquals(theDomainEvent, theDomainEvent_2);
        assertEquals(theDomainEvent.hashCode(), theDomainEvent_2.hashCode());
        assertNotSame(theDomainEvent, theDomainEvent_2);

        //same Event, other domain
        Domain theOtherDomain = DomainFactory.getDomain("otherDomain");
        DomainEvent theDomainEvent_3 = new DefaultDomainEvent(theEmptyEvent, theOtherDomain);
        assertFalse(theDomainEvent.equals(theDomainEvent_3));

        //another Event, same domain
        final Event theEmptyEvent_2 = new EmptyEvent_1("key_2"){};
View Full Code Here

@RunWith(JUnit4.class)
public class DeregistrationEventFilterCommandTest extends ClientCommandTestCase
{
    @Test
    public void testExecute() {
        final Domain theTestDomain = DomainFactory.getDomain("test_domain");

        getRemoteEventConnectorMock().deregisterEventFilter(theTestDomain, getCommandCallback());

        testExecute(new DeregistrationEventFilterCommand(getRemoteEventConnectorMock(), theTestDomain, getCommandCallback()));
    }
View Full Code Here

@RunWith(JUnit4.class)
public class RegistrationEventFilterCommandTest extends ClientCommandTestCase
{
    @Test
    public void testExecute() {
        final Domain theTestDomain = DomainFactory.getDomain("test_domain");
        final TypeEventFilterTestMode theTestEventFilter = new TypeEventFilterTestMode();

        getRemoteEventConnectorMock().registerEventFilter(theTestDomain, theTestEventFilter, getCommandCallback());

        testExecute(new RegistrationEventFilterCommand(getRemoteEventConnectorMock(), theTestDomain, theTestEventFilter, getCommandCallback()));
View Full Code Here

TOP

Related Classes of de.novanic.eventservice.client.event.domain.Domain

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.