Exemplo n.º 1
0
        public void ConfigValueParser_Can_Parse_Multiple_IpEndpoints_As_Strings()
        {
            var endPoints = ConfigValueParser.GetStringArrValues(_configurationRoot, _sectionName);

            endPoints.Should().HaveCount(2);
            endPoints.Should().Contain(_ipEndpoint1.ToString());
            endPoints.Should().Contain(_ipEndpoint2.ToString());
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public InjectableLookupClient(IConfigurationRoot configurationRoot) : base
     (
         ConfigValueParser.GetIpEndpointArrValues(configurationRoot, "DnsServers")
     )
 {
 }