Search in sources :

Example 6 with InetUtils

use of org.springframework.cloud.commons.util.InetUtils 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"));
}
Also used : InetUtilsProperties(org.springframework.cloud.commons.util.InetUtilsProperties) ServerProperties(org.springframework.boot.autoconfigure.web.ServerProperties) CoffeeNetConfigurationProperties(coffee.synyx.autoconfigure.CoffeeNetConfigurationProperties) InetUtils(org.springframework.cloud.commons.util.InetUtils) Test(org.junit.Test)

Aggregations

CoffeeNetConfigurationProperties (coffee.synyx.autoconfigure.CoffeeNetConfigurationProperties)6 Test (org.junit.Test)6 ServerProperties (org.springframework.boot.autoconfigure.web.ServerProperties)6 InetUtils (org.springframework.cloud.commons.util.InetUtils)6 InetUtilsProperties (org.springframework.cloud.commons.util.InetUtilsProperties)6 MockEnvironment (org.springframework.mock.env.MockEnvironment)4