public void ConfigValueParser_Can_Parse_Multiple_IpEndpoints() { var endPoints = ConfigValueParser.GetIpEndpointArrValues(_configurationRoot, _sectionName); endPoints.Should().HaveCount(2); endPoints.Should().Contain(_ipEndpoint1); endPoints.Should().Contain(_ipEndpoint2); }
public void ConfigValueParser_Can_Parse_Empty_Config() { var peerConfig = new List <KeyValuePair <string, string> >(); var configurationRoot = new ConfigurationBuilder().AddInMemoryCollection(peerConfig).Build(); var endPoints = ConfigValueParser.GetIpEndpointArrValues(configurationRoot, _sectionName); endPoints.Should().HaveCount(0); }
public InjectableLookupClient(IConfigurationRoot configurationRoot) : base ( ConfigValueParser.GetIpEndpointArrValues(configurationRoot, "DnsServers") ) { }