public ActionResult AddStylists(int specialityId) { Speciality speciality = Speciality.Find(specialityId); Stylist stylists = Stylist.Find(Int32.Parse(Request.Form["stylist-id"])); speciality.AddStylists(stylists); return(RedirectToAction("Index")); }
public void GetStylists_ReturnsAllSpecialityStylists_StylistList() { //Arrange Stylist testStylist = new Stylist("Mel"); testStylist.Save(); Speciality testSpeciality = new Speciality("Cut"); testSpeciality.Save(); //Act testSpeciality.AddStylists(testStylist); List <Stylist> result = testSpeciality.GetStylists(); List <Stylist> testList = new List <Stylist> { testStylist }; //Assert CollectionAssert.AreEqual(testList, result); }