public void ImportFromScrewTurn_Should_TempData_Error_Message_When_ConnectionString_Is_Empty() { // Arrange // Act RedirectToRouteResult result = _toolsController.ImportFromScrewTurn("") as RedirectToRouteResult; // Assert Assert.That(result, Is.Not.Null, "RedirectToRouteResult"); Assert.That(result.RouteValues["action"], Is.EqualTo("Index")); Assert.That(_toolsController.TempData["ErrorMessage"], Is.Not.Null.Or.Empty); }
public void importfromscrewturn_should_tempdata_error_message_when_connectionstring_is_empty() { // Arrange // Act RedirectToRouteResult result = _toolsController.ImportFromScrewTurn("") as RedirectToRouteResult; // Assert Assert.That(result, Is.Not.Null, "RedirectToRouteResult"); Assert.That(result.RouteValues["action"], Is.EqualTo("Index")); Assert.That(_toolsController.TempData["ErrorMessage"], Is.Not.Null.Or.Empty); }