Search in sources :

Example 1 with EzyStarter

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

the class EzyStarterTest method notPrintSettings.

@Test
public void notPrintSettings() {
    // given
    EzyStarter starter = new ExEzyStarter.Builder().build();
    EzyConfig config = mock(EzyConfig.class);
    when(config.isPrintSettings()).thenReturn(false);
    EzySimpleServer server = new EzySimpleServer();
    server.setConfig(config);
    EzySimpleSettings settings = new EzySimpleSettings();
    server.setSettings(settings);
    // when
    MethodInvoker.create().object(starter).method("startEzyFox").param(EzyServer.class, server).call();
    // then
    verify(config, times(1)).isPrintSettings();
}
Also used : EzyStarter(com.tvd12.ezyfoxserver.EzyStarter) EzyConfig(com.tvd12.ezyfoxserver.config.EzyConfig) EzySimpleServer(com.tvd12.ezyfoxserver.EzySimpleServer) EzySimpleSettings(com.tvd12.ezyfoxserver.setting.EzySimpleSettings) EzyServer(com.tvd12.ezyfoxserver.EzyServer) Test(org.testng.annotations.Test)

Example 2 with EzyStarter

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

the class EzyStarterTest method normalCaseTest.

@Test
public void normalCaseTest() throws Exception {
    EzyStarter starter = new ExEzyStarter.Builder().configFile("test-data/settings/config.properties").build();
    starter.start();
}
Also used : EzyStarter(com.tvd12.ezyfoxserver.EzyStarter) EzyAbstractServerBootstrapBuilder(com.tvd12.ezyfoxserver.builder.EzyAbstractServerBootstrapBuilder) EzyServerBootstrapBuilder(com.tvd12.ezyfoxserver.builder.EzyServerBootstrapBuilder) Test(org.testng.annotations.Test)

Aggregations

EzyStarter (com.tvd12.ezyfoxserver.EzyStarter)2 Test (org.testng.annotations.Test)2 EzyServer (com.tvd12.ezyfoxserver.EzyServer)1 EzySimpleServer (com.tvd12.ezyfoxserver.EzySimpleServer)1 EzyAbstractServerBootstrapBuilder (com.tvd12.ezyfoxserver.builder.EzyAbstractServerBootstrapBuilder)1 EzyServerBootstrapBuilder (com.tvd12.ezyfoxserver.builder.EzyServerBootstrapBuilder)1 EzyConfig (com.tvd12.ezyfoxserver.config.EzyConfig)1 EzySimpleSettings (com.tvd12.ezyfoxserver.setting.EzySimpleSettings)1