public async Task CreateRoute_ReturnSuccessStatusCode() { //Arrange var newUnit = new Route { DownstreamPathTemplate = "Test" }; var content = Utilities.GetRequestContent(newUnit); //Act var response = await _client.PostAsync(UriForTests.CreateUri(ControllerNames.Routes), content); //Assert response.EnsureSuccessStatusCode(); }
public async Task CreateLoadBalancerOption_ReturnSuccessStatusCode() { //Arrange var newUnit = new LoadBalancerOption { Type = "Test" }; var content = Utilities.GetRequestContent(newUnit); //Act var response = await _client.PostAsync(UriForTests.CreateUri(ControllerNames.LoadBalancerOptions), content); //Assert response.EnsureSuccessStatusCode(); }
public async Task CreateAuthenticationOption_ReturnSuccessStatusCode() { //Arrange var newUnit = new AuthenticationOption { AuthenticationProviderKey = "Test" }; var content = Utilities.GetRequestContent(newUnit); //Act var response = await _client.PostAsync(UriForTests.CreateUri(ControllerNames.AuthenticationOptions), content); //Assert response.EnsureSuccessStatusCode(); }
public async Task CreateDownstreamHostAndPort_ReturnSuccessStatusCode() { //Arrange var newUnit = new DownstreamHostAndPort { Host = "Test" }; var content = Utilities.GetRequestContent(newUnit); //Act var response = await _client.PostAsync(UriForTests.CreateUri(ControllerNames.DownstreamHostAndPorts), content); //Assert response.EnsureSuccessStatusCode(); }
public async Task CreateGlobalConfiguration_ReturnSuccessStatusCode() { //Arrange var newUnit = new GlobalConfiguration { BaseUrl = "Test" }; var content = Utilities.GetRequestContent(newUnit); //Act var response = await _client.PostAsync(UriForTests.CreateUri(ControllerNames.GlobalConfigurations), content); //Assert response.EnsureSuccessStatusCode(); }