Search in sources :

Example 1 with EzyRunner

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

the class EzyRunnerTest method test.

@Test(expectedExceptions = { IllegalStateException.class })
public void test() throws Exception {
    EzyRunner runner = new MyTestRunner();
    runner.run(new String[0]);
}
Also used : EzyRunner(com.tvd12.ezyfoxserver.EzyRunner) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Example 2 with EzyRunner

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

the class EzyEmbeddedServer method start.

public EzyServerContext start() throws Exception {
    EzyRunner runner = EzyEmbeddedRunner.builder().config(config).settings(settings).build();
    runner.run(new String[] { configFile });
    serverContext = runner.getServerContext();
    return serverContext;
}
Also used : EzyRunner(com.tvd12.ezyfoxserver.EzyRunner)

Example 3 with EzyRunner

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

the class EzyRunnerTest method testWithNoArg.

@Test
public void testWithNoArg() {
    try {
        EzyRunner runner = new MyTestRunner() {

            protected void validateArguments(String[] args) {
            }
        };
        runner.run(new String[0]);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : EzyRunner(com.tvd12.ezyfoxserver.EzyRunner) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Example 4 with EzyRunner

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

the class EzyRunnerTest method test1.

@Test
public void test1() throws Exception {
    try {
        EzyRunner runner = new MyTestRunner();
        runner.run(new String[] { "test-data/settings/config.properties" });
        Asserts.assertNotNull(runner.getServerContext());
    } catch (Exception e) {
        e.printStackTrace();
        throw e;
    }
}
Also used : EzyRunner(com.tvd12.ezyfoxserver.EzyRunner) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Aggregations

EzyRunner (com.tvd12.ezyfoxserver.EzyRunner)4 BaseTest (com.tvd12.test.base.BaseTest)3 Test (org.testng.annotations.Test)3