Ejemplo n.º 1
0
        public void Create_MissingOptions_ReturnsUnknown()
        {
            DiscoveryClientFactory factory  = new DiscoveryClientFactory();
            IServiceProvider       provider = new MyServiceProvier();
            IDiscoveryClient       result   = factory.Create(provider) as IDiscoveryClient;

            Assert.NotNull(result);
            Assert.Equal("Unknown", result.Description);
        }
Ejemplo n.º 2
0
        public void Create_CreatesClients()
        {
            DiscoveryOptions options = new DiscoveryOptions()
            {
                ClientType    = DiscoveryClientType.EUREKA,
                ClientOptions = new EurekaClientOptions()
                {
                    ShouldFetchRegistry      = false,
                    ShouldRegisterWithEureka = false
                }
            };
            DiscoveryClientFactory factory  = new DiscoveryClientFactory(null, options);
            IServiceProvider       provider = new MyServiceProvier();
            var result = factory.Create(provider);

            Assert.NotNull(result);
        }