public void SystemError_WhenCalled_ReturnsViewWithSystemErrorViewModel() { SystemErrorViewModel systemErrorViewModel = new SystemErrorViewModel(); OSDevGrp.MyDashboard.Web.Controllers.HomeController sut = CreateSut(); IActionResult result = sut.SystemError(systemErrorViewModel); Assert.IsNotNull(result); Assert.IsInstanceOfType(result, typeof(ViewResult)); ViewResult viewResult = (ViewResult)result; Assert.IsNotNull(viewResult); Assert.IsNotNull(viewResult.ViewName); Assert.AreEqual("SystemError", viewResult.ViewName); Assert.IsNotNull(viewResult.Model); Assert.AreEqual(systemErrorViewModel, viewResult.Model); }
public void SystemError_WhenSystemErrorViewModelIsNull_ThrowsArgumentNullExcpetion() { OSDevGrp.MyDashboard.Web.Controllers.HomeController sut = CreateSut(); sut.SystemError(null); }