예제 #1
0
 public async Task Register_RegisterAValidService_ShouldRegisterAService()
 {
     var client = new Consul.Client.Client(CreateHttpConnection());
     await client.Register(ValidService());
     var service = await client.GetService("test-service");
     Assert.Equal("test-service", service[0].Name);
 }
예제 #2
0
 public async Task GetServices_QueryWithNonExistingService_ShouldReturnAnEmptyCollection()
 {
     var client = new Consul.Client.Client(CreateHttpConnection());
     var service = await client.GetService("non-existing-service");
     Assert.Equal(new Service[0], service);
 }