Exemplo n.º 1
0
        public async Task Get_MeetUp_By_Id()
        {
            //arrange
            var request = $"{_BaseRequestUri}/1";

            //act
            var response = await _HttpClient.GetAsync(request);

            //assert
            response.EnsureSuccessStatusCode(); //if exception is not thrown all is good
            //convert the response content to expected result and test response
            var result = await ContentHelper.ContentTo <MeetUpDto>(response.Content);

            Assert.NotNull(result);
        }
Exemplo n.º 2
0
        public async Task Get_All_MeetUps()
        {
            //arrange
            var request = _BaseRequestUri;

            //act
            var response = await _HttpClient.GetAsync(request);

            //assert
            response.EnsureSuccessStatusCode(); //if exception is not thrown all is good

            //convert the response content to expected result and test response
            var result = await ContentHelper.ContentTo <IEnumerable <MeetUpHeaderDto> >(response.Content);

            Assert.NotNull(result);
        }