示例#1
0
        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();
        }
示例#2
0
        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();
        }
示例#3
0
        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();
        }
示例#4
0
        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();
        }
示例#5
0
        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();
        }