Пример #1
0
        public async Task GivenInvalidId_ReturnsNotFoundStatusCode()
        {
            var invalidId = 100;

            var response = await _client.GetAsync(UriForTests.GetUri(ControllerNames.GlobalConfigurations, invalidId));

            Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
        }
Пример #2
0
        public async Task GivenId_ReturnsDownstreamHostAndPortViewModel()
        {
            var id = 10;

            var response = await _client.GetAsync(UriForTests.GetUri(ControllerNames.DownstreamHostAndPorts, id));

            response.EnsureSuccessStatusCode();

            var vm = await Utilities.GetResponseContent <DownstreamHostAndPortDetailViewModel>(response);

            Assert.Equal(id, vm.Dto.DownstreamHostAndPortId);
        }
Пример #3
0
        public async Task GivenId_ReturnsGlobalConfigurationViewModel()
        {
            var id = 10;

            var response = await _client.GetAsync(UriForTests.GetUri(ControllerNames.GlobalConfigurations, id));

            response.EnsureSuccessStatusCode();

            var vm = await Utilities.GetResponseContent <GlobalConfigurationDetailViewModel>(response);

            Assert.Equal(id, vm.Dto.GlobalConfigurationId);
        }
Пример #4
0
        public async Task GivenId_ReturnsRouteClaimsRequirementViewModel()
        {
            var id = 10;

            var response = await _client.GetAsync(UriForTests.GetUri(ControllerNames.RouteClaimsRequirements, id));

            response.EnsureSuccessStatusCode();

            var vm = await Utilities.GetResponseContent <RouteClaimsRequirementDetailViewModel>(response);

            Assert.Equal(id, vm.Dto.RouteClaimsRequirementId);
        }