use of cn.taketoday.framework.web.servlet.server.ConfigurableServletWebServerFactory in project today-infrastructure by TAKETODAY.
the class ServletWebServerFactoryCustomizerTests method testCustomizeSsl.
@Test
void testCustomizeSsl() {
ConfigurableServletWebServerFactory factory = mock(ConfigurableServletWebServerFactory.class);
Ssl ssl = mock(Ssl.class);
this.properties.setSsl(ssl);
this.customizer.customize(factory);
then(factory).should().setSsl(ssl);
}
use of cn.taketoday.framework.web.servlet.server.ConfigurableServletWebServerFactory in project today-infrastructure by TAKETODAY.
the class ServletWebServerFactoryCustomizerTests method testCustomizeJsp.
@Test
void testCustomizeJsp() {
ConfigurableServletWebServerFactory factory = mock(ConfigurableServletWebServerFactory.class);
this.customizer.customize(factory);
then(factory).should().setJsp(any(Jsp.class));
}
use of cn.taketoday.framework.web.servlet.server.ConfigurableServletWebServerFactory in project today-infrastructure by TAKETODAY.
the class ServletWebServerFactoryCustomizerTests method testDefaultDisplayName.
@Test
void testDefaultDisplayName() {
ConfigurableServletWebServerFactory factory = mock(ConfigurableServletWebServerFactory.class);
this.customizer.customize(factory);
then(factory).should().setDisplayName("application");
}
use of cn.taketoday.framework.web.servlet.server.ConfigurableServletWebServerFactory in project today-infrastructure by TAKETODAY.
the class ServletWebServerFactoryCustomizerTests method whenShutdownPropertyIsSetThenShutdownIsCustomized.
@Test
void whenShutdownPropertyIsSetThenShutdownIsCustomized() {
Map<String, String> map = new HashMap<>();
map.put("server.shutdown", "graceful");
bindProperties(map);
ConfigurableServletWebServerFactory factory = mock(ConfigurableServletWebServerFactory.class);
this.customizer.customize(factory);
ArgumentCaptor<Shutdown> shutdownCaptor = ArgumentCaptor.forClass(Shutdown.class);
then(factory).should().setShutdown(shutdownCaptor.capture());
assertThat(shutdownCaptor.getValue()).isEqualTo(Shutdown.GRACEFUL);
}
use of cn.taketoday.framework.web.servlet.server.ConfigurableServletWebServerFactory in project today-infrastructure by TAKETODAY.
the class ServletWebServerFactoryCustomizerTests method testCustomizeDefaultServlet.
@Test
void testCustomizeDefaultServlet() {
ConfigurableServletWebServerFactory factory = mock(ConfigurableServletWebServerFactory.class);
this.properties.getServlet().setRegisterDefaultServlet(false);
this.customizer.customize(factory);
then(factory).should().setRegisterDefaultServlet(false);
}
Aggregations