Search in sources :

Example 6 with EzySimpleConfig

use of com.tvd12.ezyfoxserver.config.EzySimpleConfig in project ezyfox-server by youngmonkeys.

the class EzyConfigTest method getEzyfoxHomeTest.

@Test
public void getEzyfoxHomeTest() {
    // given
    EzySimpleConfig sut = EzySimpleConfig.defaultConfig();
    sut.setEzyfoxHome(null);
    sut.setLoggerConfigFile(null);
    // when
    String home = sut.getEzyfoxHome();
    // then
    Asserts.assertEquals("", home);
    System.out.println(sut.toMap());
}
Also used : EzySimpleConfig(com.tvd12.ezyfoxserver.config.EzySimpleConfig) BaseCoreTest(com.tvd12.ezyfoxserver.testing.BaseCoreTest) Test(org.testng.annotations.Test)

Example 7 with EzySimpleConfig

use of com.tvd12.ezyfoxserver.config.EzySimpleConfig in project ezyfox-server by youngmonkeys.

the class EzyConfigTest method test.

@Test
public void test() {
    EzySimpleConfig config = new EzySimpleConfig();
    config.setEzyfoxHome("home");
    config.setLoggerConfigFile("abc");
    assert config.toString() != null;
}
Also used : EzySimpleConfig(com.tvd12.ezyfoxserver.config.EzySimpleConfig) BaseCoreTest(com.tvd12.ezyfoxserver.testing.BaseCoreTest) Test(org.testng.annotations.Test)

Example 8 with EzySimpleConfig

use of com.tvd12.ezyfoxserver.config.EzySimpleConfig in project ezyfox-server by youngmonkeys.

the class EzyNioServerBootstrapBuilderImplTest method test.

@Test
public void test() {
    EzySimpleConfig config = new EzySimpleConfig();
    EzySimpleSettings settings = new EzySimpleSettings();
    settings.getSocket().setCodecCreator(ExCodecCreator.class.getName());
    settings.getWebsocket().setCodecCreator(ExCodecCreator.class.getName());
    EzySimpleServer server = new EzySimpleServer();
    server.setConfig(config);
    server.setSettings(settings);
    EzyNioServerBootstrapBuilderImpl builder = new EzyNioServerBootstrapBuilderImpl();
    builder.server(server);
    builder.build();
}
Also used : EzySimpleConfig(com.tvd12.ezyfoxserver.config.EzySimpleConfig) EzySimpleServer(com.tvd12.ezyfoxserver.EzySimpleServer) EzySimpleSettings(com.tvd12.ezyfoxserver.setting.EzySimpleSettings) EzyNioServerBootstrapBuilderImpl(com.tvd12.ezyfoxserver.nio.builder.impl.EzyNioServerBootstrapBuilderImpl) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Aggregations

EzySimpleConfig (com.tvd12.ezyfoxserver.config.EzySimpleConfig)8 Test (org.testng.annotations.Test)7 EzySimpleServer (com.tvd12.ezyfoxserver.EzySimpleServer)5 EzySimpleSettings (com.tvd12.ezyfoxserver.setting.EzySimpleSettings)5 EzyServerContext (com.tvd12.ezyfoxserver.context.EzyServerContext)3 BaseTest (com.tvd12.test.base.BaseTest)3 EzyServerBootstrap (com.tvd12.ezyfoxserver.EzyServerBootstrap)2 EzySimpleServerContext (com.tvd12.ezyfoxserver.context.EzySimpleServerContext)2 EzySimpleStreamingSetting (com.tvd12.ezyfoxserver.setting.EzySimpleStreamingSetting)2 BaseCoreTest (com.tvd12.ezyfoxserver.testing.BaseCoreTest)2 EzyServerControllers (com.tvd12.ezyfoxserver.wrapper.EzyServerControllers)2 EzySessionManager (com.tvd12.ezyfoxserver.wrapper.EzySessionManager)2 EzyBootstrap (com.tvd12.ezyfoxserver.EzyBootstrap)1 EzyResponseApi (com.tvd12.ezyfoxserver.api.EzyResponseApi)1 EzyStreamingApi (com.tvd12.ezyfoxserver.api.EzyStreamingApi)1 EzyAppClassLoader (com.tvd12.ezyfoxserver.ccl.EzyAppClassLoader)1 EzyAppContext (com.tvd12.ezyfoxserver.context.EzyAppContext)1 EzyPluginContext (com.tvd12.ezyfoxserver.context.EzyPluginContext)1 EzyZoneContext (com.tvd12.ezyfoxserver.context.EzyZoneContext)1 EzyNioServerBootstrap (com.tvd12.ezyfoxserver.nio.EzyNioServerBootstrap)1