Package de.novanic.eventservice.client.connection.strategy.connector

Examples of de.novanic.eventservice.client.connection.strategy.connector.ConnectionStrategyClientConnector


        final TestEventServiceConfigurationTransferable theConfig = new TestEventServiceConfigurationTransferable(DefaultClientConnector.class.getName());

        ConfigurationTransferableDependentFactory.reset();
        ConfigurationTransferableDependentFactory theConfigurationTransferableDependentFactory = ConfigurationTransferableDependentFactory.getInstance(theConfig);

        final ConnectionStrategyClientConnector theConnectionStrategyClientConnector = theConfigurationTransferableDependentFactory.getConnectionStrategyClientConnector();
        assertNotNull(theConnectionStrategyClientConnector);
        assertTrue(theConnectionStrategyClientConnector instanceof DefaultClientConnector);
    }
View Full Code Here


@RunWith(JUnit4.class)
public class DefaultStreamingClientConnectorTest
{
    @Test
    public void testInit() {
        final ConnectionStrategyClientConnector theStreamingClientConnector = new DummyStreamingClientConnector();
        assertFalse(theStreamingClientConnector.isInitialized());
        theStreamingClientConnector.init(null);
        assertTrue(theStreamingClientConnector.isInitialized());
    }
View Full Code Here

        assertTrue(theStreamingClientConnector.isInitialized());
    }

    @Test
    public void testDeactivate() {
        final ConnectionStrategyClientConnector theStreamingClientConnector = new DummyStreamingClientConnector();

        assertFalse(theStreamingClientConnector.isInitialized());
        theStreamingClientConnector.init(null);
        assertTrue(theStreamingClientConnector.isInitialized());

        assertTrue(theStreamingClientConnector.isInitialized());
        theStreamingClientConnector.deactivate();
        assertTrue(theStreamingClientConnector.isInitialized());//it is deactivated, but still initialized
    }
View Full Code Here

    public String getModuleName() {
        return "de.novanic.eventservice.GWTEventService";
    }

    public void testInit() {
        ConnectionStrategyClientConnector theGWTStreamingClientConnector = new GWTStreamingClientConnector();

        assertFalse(theGWTStreamingClientConnector.isInitialized());
        theGWTStreamingClientConnector.init(myEventService);
        assertTrue(theGWTStreamingClientConnector.isInitialized());
    }
View Full Code Here

        theConfig.setConnectionStrategyClientConnector(GWTStreamingClientConnector.class.getName());

        ConfigurationTransferableDependentFactory.reset();
        ConfigurationTransferableDependentFactory theConfigurationTransferableDependentFactory = ConfigurationTransferableDependentFactory.getInstance(theConfig);

        final ConnectionStrategyClientConnector theConnectionStrategyClientConnector = theConfigurationTransferableDependentFactory.getConnectionStrategyClientConnector();
        assertNotNull(theConnectionStrategyClientConnector);
        assertTrue(theConnectionStrategyClientConnector instanceof GWTStreamingClientConnector);
    }
View Full Code Here

        assertNotNull(theConnectionStrategyClientConnector);
        assertTrue(theConnectionStrategyClientConnector instanceof GWTStreamingClientConnector);
    }

    public void testDeactivate() {
        ConnectionStrategyClientConnector theGWTStreamingClientConnector = new GWTStreamingClientConnector();

        assertFalse(theGWTStreamingClientConnector.isInitialized());
        theGWTStreamingClientConnector.init(myEventService);
        assertTrue(theGWTStreamingClientConnector.isInitialized());

        assertTrue(theGWTStreamingClientConnector.isInitialized());
        theGWTStreamingClientConnector.deactivate();
        assertTrue(theGWTStreamingClientConnector.isInitialized());//it is deactivated, but still initialized
    }
View Full Code Here

        theGWTStreamingClientConnector.deactivate();
        assertTrue(theGWTStreamingClientConnector.isInitialized());//it is deactivated, but still initialized
    }

    public void testDeactivate_2() {
        ConnectionStrategyClientConnector theGWTStreamingClientConnector = new GWTStreamingClientConnector();

        assertFalse(theGWTStreamingClientConnector.isInitialized());
        theGWTStreamingClientConnector.init(myEventService);
        assertTrue(theGWTStreamingClientConnector.isInitialized());

        //create the forever frame
        theGWTStreamingClientConnector.listen(new DummyEventNotification(), new AsyncCallback<List<DomainEvent>>() {
            public void onSuccess(List<DomainEvent> aDomainEvents) {}

            public void onFailure(Throwable aThrowable) {}
        });

        assertTrue(theGWTStreamingClientConnector.isInitialized());
        theGWTStreamingClientConnector.deactivate();
        assertTrue(theGWTStreamingClientConnector.isInitialized());//it is deactivated, but still initialized
    }
View Full Code Here

        theGWTStreamingClientConnector.deactivate();
        assertTrue(theGWTStreamingClientConnector.isInitialized());//it is deactivated, but still initialized
    }

    public void testListen() {
        ConnectionStrategyClientConnector theGWTStreamingClientConnector = new GWTStreamingClientConnector();
        theGWTStreamingClientConnector.init(myEventService);
        theGWTStreamingClientConnector.listen(new DummyEventNotification(), new AsyncCallback<List<DomainEvent>>() {
            public void onSuccess(List<DomainEvent> aDomainEvents) {}

            public void onFailure(Throwable aThrowable) {}
        });
    }
View Full Code Here

    public String getModuleName() {
        return "de.novanic.eventservice.GWTEventService";
    }

    public void testInit() {
        ConnectionStrategyClientConnector theGWTStreamingClientConnector = new GWTStreamingClientConnectorGecko();

        assertFalse(theGWTStreamingClientConnector.isInitialized());
        theGWTStreamingClientConnector.init(myEventService);
        assertTrue(theGWTStreamingClientConnector.isInitialized());
    }
View Full Code Here

        theConfig.setConnectionStrategyClientConnector(GWTStreamingClientConnector.class.getName());

        ConfigurationTransferableDependentFactory.reset();
        ConfigurationTransferableDependentFactory theConfigurationTransferableDependentFactory = ConfigurationTransferableDependentFactory.getInstance(theConfig);

        final ConnectionStrategyClientConnector theConnectionStrategyClientConnector = theConfigurationTransferableDependentFactory.getConnectionStrategyClientConnector();
        assertNotNull(theConnectionStrategyClientConnector);
        assertTrue(theConnectionStrategyClientConnector instanceof GWTStreamingClientConnector);
    }
View Full Code Here

TOP

Related Classes of de.novanic.eventservice.client.connection.strategy.connector.ConnectionStrategyClientConnector

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.