Skip to content

Instantly share code, notes, and snippets.

@rexcfnghk
Last active July 1, 2016 04:11
Show Gist options
  • Select an option

  • Save rexcfnghk/a4c16f7c86daa6016dd6e89a4a1580ba to your computer and use it in GitHub Desktop.

Select an option

Save rexcfnghk/a4c16f7c86daa6016dd6e89a4a1580ba to your computer and use it in GitHub Desktop.
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
}
public class HomeControllerTests
{
[Fact]
public void Index_ReturnsNonNullView()
{
// Arrange
var controller = new HomeController();
// 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