Пример #1
0
        public async Task GetPostById_Should_Return_200()
        {
            var response = await HttpClient.GetAsync(MovieRoutes.GetMovieById(TestConstants.GetMovieId()));

            GetMovieResponseViewModel responseModel = await response.Content.GetAsync <GetMovieResponseViewModel>();

            Assert.Equal(HttpStatusCode.OK, response.StatusCode);

            Assert.Equal(responseModel.MovieId, TestConstants.GetMovieId());
        }
Пример #2
0
        public async Task GetMovie_Should_Return_404()
        {
            var response = await HttpClient.GetAsync(MovieRoutes.GetMovieById(Guid.NewGuid()));

            Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
        }
Пример #3
0
        public async Task GetMovie_Should_Return_400()
        {
            var response = await HttpClient.GetAsync(MovieRoutes.GetMovieById(Guid.Empty));

            Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
        }