public void AddStylist_ReturnsCorrectActionType_RedirectToActionResult() { SpecialtiesController controller = new SpecialtiesController(); IActionResult view = controller.AddStylist(1, 1); Assert.IsInstanceOfType(view, typeof(RedirectToActionResult)); }
public void All_ReturnsCorrectView_True() { SpecialtiesController controller = new SpecialtiesController(); ActionResult indexView = controller.Add(); Assert.IsInstanceOfType(indexView, typeof(ViewResult)); }
public void Show_ReturnsCorrectView_True() { SpecialtiesController controller = new SpecialtiesController(); ActionResult showView = controller.Show(1); Assert.IsInstanceOfType(showView, typeof(ViewResult)); }
public void Create_ReturnsCorrectActionType_RedirectToActionResult() { SpecialtiesController controller = new SpecialtiesController(); IActionResult view = controller.Create("Mullet"); Assert.IsInstanceOfType(view, typeof(RedirectToActionResult)); }
public void Details_ReturnsCorrectView_True() { SpecialtiesController controller = new SpecialtiesController(); IActionResult actionResult = controller.Details(1); ViewResult result = controller.Details(1) as ViewResult; Assert.IsInstanceOfType(result, typeof(ViewResult)); }
public void Create_RedirectsToCorrectAction_Index() { SpecialtiesController controller = new SpecialtiesController(); RedirectToActionResult actionResult = controller.Create("ducktail") as RedirectToActionResult; string result = actionResult.ActionName; Assert.AreEqual(result, "Index"); }
public void AddStylist_RedirectsToCorrectAction_Show() { SpecialtiesController controller = new SpecialtiesController(); RedirectToActionResult actionResult = controller.AddStylist(1, 1) as RedirectToActionResult; string result = actionResult.ActionName; Assert.AreEqual(result, "Show"); }
public void Show_HasCorrectModelType_Dictionary() { SpecialtiesController controller = new SpecialtiesController(); ViewResult showView = controller.Show(1) as ViewResult; var result = showView.ViewData.Model; Assert.IsInstanceOfType(result, typeof(Dictionary <string, object>)); }
public void Index_HasCorrectModelType_SpecialtyList() { SpecialtiesController controller = new SpecialtiesController(); ViewResult indexView = controller.Index() as ViewResult; var result = indexView.ViewData.Model; Assert.IsInstanceOfType(result, typeof(List <Specialty>)); }
public void Index_ReturnsCorrectView_True() { //Arrange //Act ActionResult result = new SpecialtiesController().Index(); //Assert Assert.IsInstanceOfType(result, typeof(ViewResult)); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); SpecialtiesForm specForm = new SpecialtiesForm(); StorageContext context = new StorageContext(); _ = new SpecialtiesController(specForm, context); Application.Run(specForm); }
public void New_ReturnsCorrectView_True() { //Arrange SpecialtiesController controller = new SpecialtiesController(); // Act ActionResult newView = controller.New(); // Assert Assert.IsInstanceOfType(newView, typeof(ViewResult)); }
public void Details_ReturnsCorrectModelType_Specialty() { SpecialtiesController controller = new SpecialtiesController(); IActionResult actionResult = controller.Details(1); ViewResult indexView = controller.Details(1) as ViewResult; var result = indexView.ViewData.Model; Assert.IsInstanceOfType(result, typeof(Specialty)); }
public void CreatePairs_ReturnsCorrectView_True() { //Arrange SpecialtiesController controller = new SpecialtiesController(); //Act ActionResult pairView = controller.CreatePairs(); //Assert Assert.IsInstanceOfType(pairView, typeof(ViewResult)); }
public void Index_ReturnsCorrectView_View() { //Arrange SpecialtiesController controller = new SpecialtiesController(); //Act IActionResult indexView = controller.Index(); //Assert Assert.IsInstanceOfType(indexView, typeof(ViewResult)); }
public void Details_HasCorrectModelType_True() { //arrange ViewResult detailsView = new SpecialtiesController().Details(1) as ViewResult; //act var result = detailsView.ViewData.Model; //assert Assert.IsInstanceOfType(result, typeof(Dictionary <string, object>)); }
public void Search_HasCorrectModelType_SpecialtyList() { //Arrange ViewResult indexView = new SpecialtiesController().Search("testSpecialty") as ViewResult; //Act var result = indexView.ViewData.Model; //Assert Assert.IsInstanceOfType(result, typeof(List <Specialty>)); }
public void Details_ReturnsCorrectView_True() { //Arrange SpecialtiesController controller = new SpecialtiesController(); //Act ActionResult indexView = controller.Details(1); //Assert Assert.IsInstanceOfType(indexView, typeof(ViewResult)); }
public void Delete_ReturnsCorrectActionType_RedirectToActionResult() { //Arrange SpecialtiesController controller = new SpecialtiesController(); //Act IActionResult view = controller.Delete(1); //Assert Assert.IsInstanceOfType(view, typeof(RedirectToActionResult)); }
public void Detail_HasCorrectModelType_SpecialtyList() { //Arrange ViewResult indexView = new SpecialtiesController().Detail(1) as ViewResult; //Act var result = indexView.ViewData.Model; //Assert Assert.IsInstanceOfType(result, typeof(Specialty)); }
public void Edit_ReturnsCorrectActionType_RedirectToActionResult() { //Arrange SpecialtiesController controller = new SpecialtiesController(); //Act IActionResult view = controller.EditPost(1, "Colorist"); //Assert Assert.IsInstanceOfType(view, typeof(RedirectToActionResult)); }
public void Create_ReturnsCorrectActionType_ViewResult() { //Arrange SpecialtiesController controller = new SpecialtiesController(); //Act IActionResult view = controller.Create("Colorist"); //Assert Assert.IsInstanceOfType(view, typeof(ViewResult)); }
public void Edit_HasCorrectModelType_StylistList() { //Arrange ViewResult editView = new SpecialtiesController().Edit(2) as ViewResult; //Act var result = editView.ViewData.Model; //Assert Assert.IsInstanceOfType(result, typeof(Specialty)); }
public void Show_HasCorrectModelType_StylistList() { //Arrange ViewResult showView = new SpecialtiesController().Show(1) as ViewResult; //Act var result = showView.ViewData.Model; //Assert Assert.IsInstanceOfType(result, typeof(Dictionary <string, object>)); }
public void Index_HasCorrectModelType_StylistList() { //Arrange ViewResult indexView = new SpecialtiesController().Index() as ViewResult; //Act var result = indexView.ViewData.Model; //Assert Assert.IsInstanceOfType(result, typeof(List <Specialty>)); }
public void Index_HasCorrectModelType_Results() { //Arrange SpecialtiesController controller = new SpecialtiesController(); ViewResult costDataType = controller.Index() as ViewResult; //Act var result = costDataType.ViewData.Model; //Assert Assert.IsInstanceOfType(result, typeof(List <Specialty>)); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var context = new StorageContext(); var specWindow = new SpecialtiesForm(); var specController = new SpecialtiesController(context, specWindow); Application.Run(specWindow); }
public void Details_ReturnIfView_True() { //arrange SpecialtiesController controller = new SpecialtiesController(); //act IActionResult detailsView = controller.Index(); ViewResult result = detailsView as ViewResult; //assert Assert.IsInstanceOfType(result, typeof(ViewResult)); }
public SpecialtiesControllerTests() { controller = new SpecialtiesController(getter.Object); }