Created
July 1, 2016 03:04
-
-
Save rexcfnghk/c3aba0b7e99b4f37c5ad4cc9f3fff0c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class HomeController : BaseController | |
| { | |
| public HomeController(UserProfile userProfile) : base(userProfile) | |
| { | |
| } | |
| public ActionResult Index() | |
| { | |
| return View(); | |
| } | |
| } | |
| public class HomeControllerTests | |
| { | |
| [Fact] | |
| public void Index_ReturnsNonNullView() | |
| { | |
| // Arrange | |
| var fakeUserProfile = new UserProfile(); | |
| var controller = new HomeController(fakeUserProfile); | |
| // Act | |
| var result = (ViewResult)controller.Index(); | |
| // Assert | |
| Assert.NotNull(result); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment