use of org.neo4j.helpers.AdvertisedSocketAddress in project neo4j by neo4j.
the class AdvertisedAddressSettingsTest method shouldCombineDefaultHostnameWithPortFromListenAddressSettingWhenNoValueProvided.
@Test
public void shouldCombineDefaultHostnameWithPortFromListenAddressSettingWhenNoValueProvided() throws Exception {
// given
Map<String, String> config = stringMap(GraphDatabaseSettings.default_advertised_address.name(), "server1.example.com");
// when
AdvertisedSocketAddress advertisedSocketAddress = advertised_address_setting.apply(config::get);
// then
assertEquals("server1.example.com", advertisedSocketAddress.getHostname());
assertEquals(1234, advertisedSocketAddress.getPort());
}
Aggregations