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); }
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); }