Example #1
0
        public void Returns_Correct_Post_Archive_BlogController()
        {
            // Arrange
            BlogController cut = new BlogController(_postRepository);
            // Act
            var result = cut.Archive("my_first_test") as ViewResult;

            // Assert
            Assert.IsNotNull(result.Model, "The Model in the result is null.");
            _postRepository.AssertWasCalled(a => a.Find("my_first_test"));
        }