Package de.novanic.eventservice.client.config

Examples of de.novanic.eventservice.client.config.EventServiceConfigurationTransferable


        }
    }

    @Test
    public void testGetInstance() {
        final EventServiceConfigurationTransferable theEventServiceConfiguration = new RemoteEventServiceConfigurationTransferable(0, 20000, 90000, 2, "12345678", DefaultClientConnector.class.getName());

        ConfigurationTransferableDependentFactory theConfigurationTransferableDependentFactory = ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration);
        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration));
        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration));
    }
View Full Code Here


        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration));
    }

    @Test
    public void testGetInstance_2() {
        final EventServiceConfigurationTransferable theEventServiceConfiguration = new RemoteEventServiceConfigurationTransferable(0, 20000, 90000, 2, "12345678", DefaultClientConnector.class.getName());

        ConfigurationTransferableDependentFactory theConfigurationTransferableDependentFactory = ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration);
        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance());
        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance());
    }
View Full Code Here

        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance());
    }

    @Test
    public void testGetInstance_3() {
        final EventServiceConfigurationTransferable theEventServiceConfiguration = new RemoteEventServiceConfigurationTransferable(0, 20000, 90000, 2, "12345678", DefaultClientConnector.class.getName());

        ConfigurationTransferableDependentFactory.reset();
        ConfigurationTransferableDependentFactory theConfigurationTransferableDependentFactory = ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration);
        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance());
        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance());
View Full Code Here

        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance());
    }

    @Test
    public void testGetInstance_Error() {
        final EventServiceConfigurationTransferable theEventServiceConfiguration = new RemoteEventServiceConfigurationTransferable(0, 20000, 90000, 2, "12345678", String.class.getName());
        try {
            ConfigurationTransferableDependentFactory.reset();
            ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration);
            fail("Exception expected, because the configured class isn't registered / unknown!");
        } catch(ExceptionInInitializerError e) {
View Full Code Here

        } catch(ConfigurationException e) {}
    }

    @Test
    public void testGetInstance_Error_3() {
        final EventServiceConfigurationTransferable theEventServiceConfiguration = new RemoteEventServiceConfigurationTransferable(0, 20000, 90000, 2, "12345678", "NotExistingClassXY");
        try {
            ConfigurationTransferableDependentFactory.reset();
            ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration);
            fail("Exception expected, because the NotExistingClassXY class couldn't be found!");
        } catch(ConfigurationException e) {
View Full Code Here

        assertTrue(theConnectionStrategyClientConnector instanceof DefaultClientConnector);
    }

    @Test
    public void testGetConnectionStrategyClientConnector_Streaming() {
        final EventServiceConfigurationTransferable theEventServiceConfiguration = new RemoteEventServiceConfigurationTransferable(0, 20000, 90000, 2, "12345678", GWTStreamingClientConnector.class.getName());

        GWTMockUtilities.disarm();

        ConfigurationTransferableDependentFactory.reset();
        ConfigurationTransferableDependentFactory theConfigurationTransferableDependentFactory = ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration);
View Full Code Here

        theEventServiceConfigurationFactory.removeConfigurationLoader(new PropertyConfigurationLoader());

        myEventService = new DummyEventServiceImpl(new DummyServletConfig(SessionConnectionIdGenerator.class.getName()));
        super.setUp(myEventService);

        EventServiceConfigurationTransferable theEventServiceConfigurationTransferable = myEventService.initEventService();
        assertNull(theEventServiceConfigurationTransferable.getConnectionId());
    }
View Full Code Here

        setUp(createConfiguration(0, 30000, 90000, SessionExtendedConnectionIdGenerator.class.getName(), LongPollingServerConnector.class.getName()));

        myEventService = new DummyEventServiceImpl(new DummyServletConfig(SessionExtendedConnectionIdGenerator.class.getName()));
        super.setUp(myEventService);

        EventServiceConfigurationTransferable theEventServiceConfigurationTransferable = myEventService.initEventService();
        assertEquals("test_user_id", theEventServiceConfigurationTransferable.getConnectionId());
    }
View Full Code Here

TOP

Related Classes of de.novanic.eventservice.client.config.EventServiceConfigurationTransferable

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.