public void Edit_Model_ShouldReturnView() { //arrange var controller = new RegisterController(ClassStub); var historyTable = new HistoryTable(); //act var result = controller.Edit(historyTable) as RedirectToRouteResult; //assert Assert.That(result, Is.TypeOf(typeof(RedirectToRouteResult))); Assert.IsNotNull(result); }
public void Edit_NullModel_ShouldReturnView() { //arrange HistoryTable historyTable = null; var controller = new RegisterController(ClassStub); //int id = 1; //act var result = controller.Edit(historyTable); //assert Assert.That(result, Is.TypeOf(typeof(ViewResult))); }