use of com.github.mjeanroy.junit.servers.servers.EmbeddedServer in project junit-servers by mjeanroy.
the class JettyServerJunit4RunnerTest method it_should_instantiate_jetty_with_default_configuration.
@Test
void it_should_instantiate_jetty_with_default_configuration() throws Exception {
final JettyServerJunit4Runner runner = createRunner(TestClassWithConfiguration.class);
final EmbeddedServer<?> server = (EmbeddedServer<?>) readField(runner, "server", true);
final AbstractConfiguration conf = (AbstractConfiguration) readField(runner, "configuration", true);
assertThat(server).isInstanceOf(EmbeddedJetty.class);
assertThat(conf).isInstanceOf(EmbeddedJettyConfiguration.class).isNotSameAs(configuration);
}
use of com.github.mjeanroy.junit.servers.servers.EmbeddedServer in project junit-servers by mjeanroy.
the class JettyServerJunit4RunnerTest method it_should_instantiate_jetty_with_configuration.
@Test
void it_should_instantiate_jetty_with_configuration() throws Exception {
final JettyServerJunit4Runner runner = createRunner(TestClassWithConfigurationInitializer.class);
final EmbeddedServer<?> server = (EmbeddedServer<?>) readField(runner, "server", true);
final AbstractConfiguration conf = (AbstractConfiguration) readField(runner, "configuration", true);
assertThat(server).isInstanceOf(EmbeddedJetty.class);
assertThat(conf).isInstanceOf(EmbeddedJettyConfiguration.class).isSameAs(configuration);
}
use of com.github.mjeanroy.junit.servers.servers.EmbeddedServer in project junit-servers by mjeanroy.
the class TomcatServerJunit4RunnerTest method it_should_instantiate_tomcat_with_configuration.
@Test
void it_should_instantiate_tomcat_with_configuration() throws Exception {
final TomcatServerJunit4Runner runner = createRunner(TestClassWithConfigurationInitializer.class);
final EmbeddedServer<?> server = (EmbeddedServer<?>) readField(runner, "server", true);
final AbstractConfiguration conf = (AbstractConfiguration) readField(runner, "configuration", true);
assertThat(server).isInstanceOf(EmbeddedTomcat.class);
assertThat(conf).isInstanceOf(EmbeddedTomcatConfiguration.class).isSameAs(configuration);
}
use of com.github.mjeanroy.junit.servers.servers.EmbeddedServer in project junit-servers by mjeanroy.
the class TomcatServerJunit4RunnerTest method it_should_instantiate_tomcat_with_default_configuration.
@Test
void it_should_instantiate_tomcat_with_default_configuration() throws Exception {
final TomcatServerJunit4Runner runner = createRunner(TestClassWithInjectedConfiguration.class);
final EmbeddedServer<?> server = (EmbeddedServer<?>) readField(runner, "server", true);
final AbstractConfiguration conf = (AbstractConfiguration) readField(runner, "configuration", true);
assertThat(server).isInstanceOf(EmbeddedTomcat.class);
assertThat(conf).isInstanceOf(EmbeddedTomcatConfiguration.class).isNotSameAs(configuration);
}
use of com.github.mjeanroy.junit.servers.servers.EmbeddedServer in project junit-servers by mjeanroy.
the class JunitServerRunnerTest method it_should_instantiate_jetty_with_configuration.
@Test
void it_should_instantiate_jetty_with_configuration() throws Exception {
final JunitServerRunner runner = new JunitServerRunner(TestClassWithConfigurationMethod.class);
final EmbeddedServer<?> server = (EmbeddedServer<?>) readField(runner, "server", true);
final AbstractConfiguration conf = (AbstractConfiguration) readField(runner, "configuration", true);
assertThat(server).isInstanceOf(EmbeddedJetty.class);
assertThat(conf).isSameAs(configuration);
}
Aggregations