Пример #1
0
        public async Task ReturnsNotFoundWhenNoVideos()
        {
            _session
            .ExecuteAsync(Arg.Any <GetAllVideosQuery>())
            .Returns(Enumerable.Empty <Video>());

            var result = await _controller.Get();

            result.Should().BeOfType <NotFoundResult>();
        }
Пример #2
0
        public void GetAll()
        {
            MockVideoService.Setup(r => r.GetAll()).Returns(new List <VideoBO> {
                MockVideoBO
            });

            var result = _controller.Get();

            Assert.NotEmpty(result);
        }