public void Index() { ProgramareController controller = new ProgramareController(); ViewResult result = controller.Index() as ViewResult; ViewModel viewModel = controller.Index() as ViewModel; // Assert Assert.IsNotNull(result); Assert.IsEquals("Programare", viewModel.Title); }
public void ProgramareControllerTest() { var controller = new ProgramareController(); var result = controller.Index() as ViewResult; var model = result.Model as AboutViewModel; // Assert Assert.IsNotNull(result); Assert.AreEqual("Programare", model.Title); }