Search in sources :

Example 6 with EzyConfig

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

the class EzyConfigBuilderTest method test.

@Test
public void test() {
    EzyConfig config = new EzyConfigBuilder().ezyfoxHome(".").printSettings(true).printBanner(true).bannerFile("banner.txt").loggerConfigFile("log.properties").enableAppClassLoader(true).build();
    assertEquals(config.getEzyfoxHome(), ".");
    assertTrue(config.isPrintSettings());
    assertTrue(config.isPrintBanner());
    assertEquals(config.getBannerFile(), "banner.txt");
    assertEquals(config.getLoggerConfigFile(), "log.properties");
    assertTrue(config.isEnableAppClassLoader());
}
Also used : EzyConfig(com.tvd12.ezyfoxserver.config.EzyConfig) EzyConfigBuilder(com.tvd12.ezyfoxserver.config.EzyConfigBuilder) Test(org.testng.annotations.Test)

Example 7 with EzyConfig

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

the class EzySimpleConfigLoaderTest method loadFilePathNullTest.

@Test
public void loadFilePathNullTest() {
    // given
    EzySimpleConfigLoader sut = new EzySimpleConfigLoader();
    // when
    EzyConfig config = sut.load(null);
    // then
    Asserts.assertEquals(EzySimpleConfig.defaultConfig(), config);
}
Also used : EzyConfig(com.tvd12.ezyfoxserver.config.EzyConfig) EzySimpleConfigLoader(com.tvd12.ezyfoxserver.config.EzySimpleConfigLoader) Test(org.testng.annotations.Test)

Example 8 with EzyConfig

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

the class EzyLoaderTest method test.

@Test
public void test() throws Exception {
    EzySimpleServer server = newServer();
    EzyConfig config = server.getConfig();
    assertEquals(config.getEzyfoxHome(), "test-data");
    assertEquals(config.getLoggerConfigFile(), "logback.groovy");
}
Also used : EzyConfig(com.tvd12.ezyfoxserver.config.EzyConfig) EzySimpleServer(com.tvd12.ezyfoxserver.EzySimpleServer) Test(org.testng.annotations.Test)

Aggregations

EzyConfig (com.tvd12.ezyfoxserver.config.EzyConfig)8 Test (org.testng.annotations.Test)6 EzySimpleServer (com.tvd12.ezyfoxserver.EzySimpleServer)2 File (java.io.File)2 EzyServer (com.tvd12.ezyfoxserver.EzyServer)1 EzyStarter (com.tvd12.ezyfoxserver.EzyStarter)1 EzyConfigBuilder (com.tvd12.ezyfoxserver.config.EzyConfigBuilder)1 EzySimpleConfigLoader (com.tvd12.ezyfoxserver.config.EzySimpleConfigLoader)1 EzySimpleSettings (com.tvd12.ezyfoxserver.setting.EzySimpleSettings)1