Ejemplo n.º 1
0
        public void Delete_from_Favorites_Functionality_Should_Work()
        {
            var news = new News
            {
                Title = ""
            };

            _mock.Setup(item => item.RemoveFromFavorites(news));
            var actual = (OkObjectResult)_newsController.DeleteFromFavorites(news);

            _mock.Verify(item => item.RemoveFromFavorites(news), Times.Once);
            Assert.IsAssignableFrom <IActionResult>(actual);
            Assert.Equal(200, actual.StatusCode);
        }