예제 #1
0
        public async Task UpdateRoute_ReturnsNotFoundStatusCode()
        {
            //Arrange
            var newUnit = new Route {
                DownstreamScheme = "Test10", RouteId = 80
            };
            var content = Utilities.GetRequestContent(newUnit);

            //Act
            var response =
                await _client.PutAsync(UriForTests.UpdateUri(ControllerNames.Routes), content);

            //Assert
            Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
        }
예제 #2
0
        public async Task UpdateLoadBalancerOption_ReturnsNotFoundStatusCode()
        {
            //Arrange
            var newUnit = new LoadBalancerOption {
                Type = "Test10", LoadBalancerOptionId = 80
            };
            var content = Utilities.GetRequestContent(newUnit);

            //Act
            var response =
                await _client.PutAsync(UriForTests.UpdateUri(ControllerNames.LoadBalancerOptions), content);

            //Assert
            Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
        }
예제 #3
0
        public async Task UpdateRoute_ReturnSuccessStatusCode()
        {
            //Arrange
            var newUnit = new Route {
                DownstreamScheme = "Test10", RouteId = 10
            };
            var content = Utilities.GetRequestContent(newUnit);

            //Act
            var response =
                await _client.PutAsync(UriForTests.UpdateUri(ControllerNames.Routes), content);

            //Assert
            response.EnsureSuccessStatusCode();
        }
예제 #4
0
        public async Task UpdateDownstreamHostAndPort_ReturnsNotFoundStatusCode()
        {
            //Arrange
            var newUnit = new DownstreamHostAndPort {
                Host = "Test10", DownstreamHostAndPortId = 80
            };
            var content = Utilities.GetRequestContent(newUnit);

            //Act
            var response =
                await _client.PutAsync(UriForTests.UpdateUri(ControllerNames.DownstreamHostAndPorts), content);

            //Assert
            Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
        }
예제 #5
0
        public async Task UpdateLoadBalancerOption_ReturnSuccessStatusCode()
        {
            //Arrange
            var newUnit = new LoadBalancerOption {
                Type = "Test10", LoadBalancerOptionId = 10
            };
            var content = Utilities.GetRequestContent(newUnit);

            //Act
            var response =
                await _client.PutAsync(UriForTests.UpdateUri(ControllerNames.LoadBalancerOptions), content);

            //Assert
            response.EnsureSuccessStatusCode();
        }
예제 #6
0
        public async Task UpdateDownstreamHostAndPort_ReturnSuccessStatusCode()
        {
            //Arrange
            var newUnit = new DownstreamHostAndPort {
                Host = "Test10", DownstreamHostAndPortId = 10
            };
            var content = Utilities.GetRequestContent(newUnit);

            //Act
            var response =
                await _client.PutAsync(UriForTests.UpdateUri(ControllerNames.DownstreamHostAndPorts), content);

            //Assert
            response.EnsureSuccessStatusCode();
        }
예제 #7
0
        public async Task UpdateAuthenticationOption_ReturnsNotFoundStatusCode()
        {
            //Arrange
            var newUnit = new AuthenticationOption {
                AuthenticationProviderKey = "Test10", AuthenticationOptionId = 80
            };
            var content = Utilities.GetRequestContent(newUnit);

            //Act
            var response =
                await _client.PutAsync(UriForTests.UpdateUri(ControllerNames.AuthenticationOptions), content);

            //Assert
            Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
        }
예제 #8
0
        public async Task UpdateAuthenticationOption_ReturnSuccessStatusCode()
        {
            //Arrange
            var newUnit = new AuthenticationOption {
                AuthenticationProviderKey = "Test10", AuthenticationOptionId = 10
            };
            var content = Utilities.GetRequestContent(newUnit);

            //Act
            var response =
                await _client.PutAsync(UriForTests.UpdateUri(ControllerNames.AuthenticationOptions), content);

            //Assert
            response.EnsureSuccessStatusCode();
        }
예제 #9
0
        public async Task UpdateGlobalConfiguration_ReturnsNotFoundStatusCode()
        {
            //Arrange
            var newUnit = new GlobalConfiguration {
                BaseUrl = "Test10", GlobalConfigurationId = 80
            };
            var content = Utilities.GetRequestContent(newUnit);

            //Act
            var response =
                await _client.PutAsync(UriForTests.UpdateUri(ControllerNames.GlobalConfigurations), content);

            //Assert
            Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
        }
예제 #10
0
        public async Task UpdateGlobalConfiguration_ReturnSuccessStatusCode()
        {
            //Arrange
            var newUnit = new GlobalConfiguration {
                BaseUrl = "Test10", GlobalConfigurationId = 10
            };
            var content = Utilities.GetRequestContent(newUnit);

            //Act
            var response =
                await _client.PutAsync(UriForTests.UpdateUri(ControllerNames.GlobalConfigurations), content);

            //Assert
            response.EnsureSuccessStatusCode();
        }