Beispiel #1
0
        public async Task GetChannelClips_Given_ChannelName_ReturnsJsonObject()
        {
            var response = new RestResponse
            {
                ContentType    = "application/json",
                ResponseStatus = ResponseStatus.Completed,
                StatusCode     = System.Net.HttpStatusCode.OK
            };

            _restClientServiceMock.Setup(x => x.ExecuteAsync(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <Method>())).ReturnsAsync(
                response).Verifiable();
            // Act
            var result = await _controller.GetChannelClips("lirik");

            // Assert
            result.Should().BeOfType <OkObjectResult>();
        }