Example #1
0
        public async Task Return404NotFoundWhenNoPhotosAreFoundAsync()
        {
            service.Setup(x => x.GetAlbumsAsync()).ReturnsAsync(new List <Album>());

            var result = await controller.GetAsync();

            var notfound = result.Result as NotFoundObjectResult;

            result.Should().NotBeNull();
            notfound.Should().BeOfType <NotFoundObjectResult>();
            notfound.Value.Should().NotBeNull();
        }