Beispiel #1
0
        public async Task GetPhotosHandlesNullResponse()
        {
            _requestBuilderMock
            .Setup(m => m.AddPath("photos"))
            .Returns(_requestBuilderMock.Object);

            _requestBuilderMock
            .Setup(m => m.AddQueryParameter(It.IsAny <string>(), It.IsAny <string>()))
            .Returns(_requestBuilderMock.Object);

            _requestBuilderMock
            .Setup(m => m.MakeRequest <PhotosResponse>())
            .ReturnsAsync((PhotosResponse)null);

            Assert.Empty(await _rover.GetPhotosAsync());
        }