public IActionResult ChangeStylistName(int id) { Stylist thisStylist = Stylist.FindStylist(id); string result = Request.Form["new-name"]; thisStylist.ChangeName(result); return(RedirectToAction("Index", "Home")); }
public void ChangeName_ChangeStylistNameInDatabase_Stylist() { // Arrange Stylist testStylist = new Stylist("testName1"); testStylist.Save(); string testName = "testname2"; // Act testStylist.ChangeName(testName); // Assert Assert.AreEqual(testName, Stylist.Find(testStylist.GetId()).GetName()); }