use of org.springframework.boot.autoconfigure.web.ServerProperties in project coffeenet-starter by coffeenet.
the class CoffeeNetDiscoveryInstancePropertiesTest method setServerPort.
@Test
public void setServerPort() {
int port = 9999;
ServerProperties serverProperties = new ServerProperties();
serverProperties.setPort(port);
CoffeeNetDiscoveryInstanceProperties sut = new CoffeeNetDiscoveryInstanceProperties(new InetUtils(new InetUtilsProperties()), serverProperties, new CoffeeNetConfigurationProperties());
assertThat(sut.getNonSecurePort(), is(port));
}
use of org.springframework.boot.autoconfigure.web.ServerProperties in project coffeenet-starter by coffeenet.
the class CoffeeNetDiscoveryInstancePropertiesTest method defaultValues.
@Test
public void defaultValues() {
InetUtils inetUtils = new InetUtils(new InetUtilsProperties());
ServerProperties serverProperties = new ServerProperties();
CoffeeNetConfigurationProperties coffeeNetConfigurationProperties = new CoffeeNetConfigurationProperties();
CoffeeNetDiscoveryInstanceProperties sut = new CoffeeNetDiscoveryInstanceProperties(inetUtils, serverProperties, coffeeNetConfigurationProperties);
assertThat(sut.getNonSecurePort(), is(8080));
assertThat(sut.getHostname(), is("localhost"));
}
Aggregations