Search in sources :

Example 1 with ConfigurableReactiveWebServerFactory

use of org.springframework.boot.web.reactive.server.ConfigurableReactiveWebServerFactory in project spring-boot by spring-projects.

the class DefaultReactiveWebServerCustomizerTests method testCustomizeServerPort.

@Test
public void testCustomizeServerPort() throws Exception {
    ConfigurableReactiveWebServerFactory factory = mock(ConfigurableReactiveWebServerFactory.class);
    this.properties.setPort(9000);
    this.customizer.customize(factory);
    verify(factory).setPort(9000);
}
Also used : ConfigurableReactiveWebServerFactory(org.springframework.boot.web.reactive.server.ConfigurableReactiveWebServerFactory) Test(org.junit.Test)

Example 2 with ConfigurableReactiveWebServerFactory

use of org.springframework.boot.web.reactive.server.ConfigurableReactiveWebServerFactory in project spring-boot by spring-projects.

the class ReactiveWebServerFactoryCustomizerTests method testCustomizeServerPort.

@Test
void testCustomizeServerPort() {
    ConfigurableReactiveWebServerFactory factory = mock(ConfigurableReactiveWebServerFactory.class);
    this.properties.setPort(9000);
    this.customizer.customize(factory);
    then(factory).should().setPort(9000);
}
Also used : ConfigurableReactiveWebServerFactory(org.springframework.boot.web.reactive.server.ConfigurableReactiveWebServerFactory) Test(org.junit.jupiter.api.Test)

Example 3 with ConfigurableReactiveWebServerFactory

use of org.springframework.boot.web.reactive.server.ConfigurableReactiveWebServerFactory in project spring-boot by spring-projects.

the class ReactiveWebServerFactoryCustomizerTests method testCustomizeServerAddress.

@Test
void testCustomizeServerAddress() {
    ConfigurableReactiveWebServerFactory factory = mock(ConfigurableReactiveWebServerFactory.class);
    InetAddress address = mock(InetAddress.class);
    this.properties.setAddress(address);
    this.customizer.customize(factory);
    then(factory).should().setAddress(address);
}
Also used : ConfigurableReactiveWebServerFactory(org.springframework.boot.web.reactive.server.ConfigurableReactiveWebServerFactory) InetAddress(java.net.InetAddress) Test(org.junit.jupiter.api.Test)

Example 4 with ConfigurableReactiveWebServerFactory

use of org.springframework.boot.web.reactive.server.ConfigurableReactiveWebServerFactory in project spring-boot by spring-projects.

the class ReactiveWebServerFactoryCustomizerTests method testCustomizeServerSsl.

@Test
void testCustomizeServerSsl() {
    ConfigurableReactiveWebServerFactory factory = mock(ConfigurableReactiveWebServerFactory.class);
    Ssl ssl = mock(Ssl.class);
    this.properties.setSsl(ssl);
    this.customizer.customize(factory);
    then(factory).should().setSsl(ssl);
}
Also used : ConfigurableReactiveWebServerFactory(org.springframework.boot.web.reactive.server.ConfigurableReactiveWebServerFactory) Ssl(org.springframework.boot.web.server.Ssl) Test(org.junit.jupiter.api.Test)

Example 5 with ConfigurableReactiveWebServerFactory

use of org.springframework.boot.web.reactive.server.ConfigurableReactiveWebServerFactory in project spring-boot by spring-projects.

the class DefaultReactiveWebServerCustomizerTests method testCustomizeServerAddress.

@Test
public void testCustomizeServerAddress() throws Exception {
    ConfigurableReactiveWebServerFactory factory = mock(ConfigurableReactiveWebServerFactory.class);
    InetAddress address = mock(InetAddress.class);
    this.properties.setAddress(address);
    this.customizer.customize(factory);
    verify(factory).setAddress(address);
}
Also used : ConfigurableReactiveWebServerFactory(org.springframework.boot.web.reactive.server.ConfigurableReactiveWebServerFactory) InetAddress(java.net.InetAddress) Test(org.junit.Test)

Aggregations

ConfigurableReactiveWebServerFactory (org.springframework.boot.web.reactive.server.ConfigurableReactiveWebServerFactory)6 Test (org.junit.jupiter.api.Test)4 InetAddress (java.net.InetAddress)2 Test (org.junit.Test)2 Shutdown (org.springframework.boot.web.server.Shutdown)1 Ssl (org.springframework.boot.web.server.Ssl)1