Search in sources :

Example 1 with RatpackServer

use of ratpack.server.RatpackServer in project ratauth by alfa-laboratory.

the class RatAuthServerTest method testRatpackServerBeanShouldStartsWithDefaultConfiguration.

@Test
public void testRatpackServerBeanShouldStartsWithDefaultConfiguration() throws UnknownHostException {
    registerAndRefresh(TestDefaultConfiguration.class);
    RatpackServer ratpackServer = this.context.getBean(RatpackServer.class);
    assertThat(ratpackServer.getBindPort()).isEqualTo(DEFAULT_RATPACK_PORT);
}
Also used : RatpackServer(ratpack.server.RatpackServer) Test(org.junit.Test)

Example 2 with RatpackServer

use of ratpack.server.RatpackServer in project ratauth by alfa-laboratory.

the class RatAuthServerTest method testRatpackServerBeanShouldCustomizeServerPort.

@Test
public void testRatpackServerBeanShouldCustomizeServerPort() throws UnknownHostException {
    registerAndRefresh(TestDefaultConfiguration.class, "ratpack.port=6060");
    RatpackServer ratpackServer = this.context.getBean(RatpackServer.class);
    assertThat(ratpackServer.getBindPort()).isEqualTo(6060);
}
Also used : RatpackServer(ratpack.server.RatpackServer) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 RatpackServer (ratpack.server.RatpackServer)2