public void Test_Save_AssignsIdToStylistObject() { Stylist testStylist = new Stylist("StylistA", "*****@*****.**", "photolink here"); testStylist.Save(); Stylist savedStylist = Stylist.GetAll()[0]; int result = savedStylist.GetId(); int testId = testStylist.GetId(); Assert.Equal(testId, result); }
public void Test2_Save() { Stylist testStylist = new Stylist("StylistName"); testStylist.Save(); Stylist savedStylist = Stylist.GetAll()[0]; int result = savedStylist.GetId(); int testId = testStylist.GetId(); Assert.Equal(testId, result); }
public void Test_Save_SavesStylistToDatabase() { Stylist testStylist = new Stylist("StylistA", "*****@*****.**", "photolink here"); testStylist.Save(); List <Stylist> result = Stylist.GetAll(); List <Stylist> testList = new List <Stylist> { testStylist }; Assert.Equal(testList, result); }
public void Test_IfSaveAndReturnStylist_True() { Stylist expectedStylist = new Stylist("Beth Jones"); List <Stylist> allStylists = new List <Stylist> { }; expectedStylist.Save(); allStylists = Stylist.GetAll(); Stylist returnStylist = allStylists[0]; Assert.Equal(expectedStylist, returnStylist); }
public void TestStylists_DatabaseEmptyAtFirst() { //Arrange List <Stylist> allStylists = new List <Stylist> { }; //Act List <Stylist> testList = Stylist.GetAll(); //Assert Assert.Equal(allStylists, testList); }
public void T3_Save_DoesStylistSaveWork() { //Arrange Stylist newStylist = new Stylist("Amy Zee"); //Act newStylist.Save(); Stylist result = Stylist.GetAll()[0]; //Assert Assert.Equal(newStylist, result); }
public void Test_Save_AssignsIdToObject() { Stylist newStylist = new Stylist("Frieda", "MWF", 1); newStylist.Save(); Stylist savedStylist = Stylist.GetAll()[0]; int result = savedStylist.Id; int testId = newStylist.Id; Assert.Equal(testId, result); }
public void Test_Save_SavesToDatabase() { Stylist newStylist = new Stylist("Frieda", "MWF", 1); newStylist.Save(); List <Stylist> result = Stylist.GetAll(); List <Stylist> testList = new List <Stylist> { newStylist }; Assert.Equal(testList, result); }
public void Save_SavesStylisToDatabase_true() { //Arrange Stylist newStylist = new Stylist("Francesca"); //Act newStylist.Save(); List <Stylist> allStylists = Stylist.GetAll(); //Assert Assert.Equal(newStylist, allStylists[0]); }
public void Test_Save_AssignsIdToObject() { Stylist testStylist = new Stylist("Jenny", "Portland"); testStylist.Save(); Stylist savedStylist = Stylist.GetAll()[0]; int result = savedStylist.GetId(); int testId = testStylist.GetId(); Assert.Equal(testId, result); }
public void UpdateStylist() { Stylist stylist = new Stylist("John Jones", 1); stylist.Save(); stylist.Update("Jim Jones"); Stylist savedStylist = Stylist.GetAll()[0]; Assert.Equal(savedStylist.GetName(), "Jim Jones"); }
public void DeleteStylistNoClients() { Stylist stylist = new Stylist("Jody Johnson", 1); stylist.Save(); stylist.Delete(); int length = Stylist.GetAll().Count; Assert.Equal(length, 0); }
public void Test_AddNameToDatabase_Hilary() { Stylist newStylist = new Stylist("Hilary"); newStylist.Save(); List <Stylist> ListOfStylist = Stylist.GetAll(); List <Stylist> TestList = new List <Stylist> { newStylist }; Assert.Equal(ListOfStylist[0], TestList[0]); }
public void Test_Save_SavesToDatabase() { Stylist testStylist = new Stylist("Jenny", "Portland"); testStylist.Save(); List <Stylist> result = Stylist.GetAll(); List <Stylist> testList = new List <Stylist> { testStylist }; Assert.Equal(testList, result); }
public void Test_Save_AssignsIdToStylistObject() { Stylist testStylist = new Stylist("Giovanni", "(555)555-5555", "Fast, does good work."); testStylist.Save(); Stylist savedStylist = Stylist.GetAll()[0]; int testId = testStylist.GetId(); int result = savedStylist.GetId(); Assert.Equal(testId, result); }
public void CreatesAndReturnsStylist() { Stylist stylist = new Stylist("Jody Johnson", 1); stylist.Save(); Stylist savedStylist = Stylist.GetAll()[0]; int result = savedStylist.GetId(); int testId = stylist.GetId(); Assert.Equal(result, testId); }
public void Test_Save_ToStylistDatabase() { Stylist testStylist = new Stylist("Fran", "Dresher", "Perm"); testStylist.Save(); List <Stylist> result = Stylist.GetAll(); List <Stylist> testList = new List <Stylist> { testStylist }; Assert.Equal(testList, result); }
public void Test_Save_SavesStylistToDatabase() { Stylist testStylist = new Stylist("Giovanni", "(555)555-5555", "Fast, does good work."); testStylist.Save(); List <Stylist> result = Stylist.GetAll(); List <Stylist> testList = new List <Stylist> { testStylist }; Assert.Equal(testList, result); }
public void Test_IfGetAllStoresSeveralStylists_True() { Stylist newStylistOne = new Stylist("Beth Jones"); Stylist newStylistTwo = new Stylist("Jeremy Myer"); List <Stylist> allStylists = new List <Stylist> { }; newStylistOne.Save(); newStylistTwo.Save(); allStylists = Stylist.GetAll(); Assert.Equal(2, allStylists.Count); }
public void Test_Save_AssignsIdToStylistInDatabase() { //Arrange Stylist testStylist = new Stylist("Harry Cutter", "a great stylist", 3); testStylist.Save(); //Act Stylist savedStylist = Stylist.GetAll()[0]; int testId = testStylist.GetId(); int expectedId = savedStylist.GetId(); //Assert Assert.Equal(testId, expectedId); }
public ActionResult ClientDetails(int id) { Dictionary <string, object> model = new Dictionary <string, object>(); Client selectedClient = Client.Find(id); List <Stylist> clientStylists = selectedClient.GetStylists(); List <Stylist> allStylists = Stylist.GetAll(); model.Add("client", selectedClient); model.Add("clientStylists", clientStylists); model.Add("allStylists", allStylists); return(View(model)); }
public void ReturnAllStylists() { Stylist stylist = new Stylist("Jody Johnson", 1); Stylist stylist2 = new Stylist("Judy Johnson", 2); stylist.Save(); stylist2.Save(); List <Stylist> stylistList = Stylist.GetAll(); Assert.Equal(new List <Stylist> { stylist, stylist2 }, stylistList); }
[Fact] //Verify we are saving stylist to our Database. public void Test_Stylist_Save_SaveToDB() { //Arrange Stylist bob = new Stylist("Bob the SuperStylist"); //Act bob.Save(); List <Stylist> result = Stylist.GetAll(); List <Stylist> testList = new List <Stylist> { bob }; //Assert Assert.Equal(result, testList); }
public void TestStylists_Save_SavesStylistToDatabase() { //arrange Stylist testStylist = new Stylist("AmyRose", "Pearl"); //Act testStylist.Save(); List <Stylist> result = Stylist.GetAll(); List <Stylist> testList = new List <Stylist> { testStylist }; //assert Assert.Equal(testList, result); }
public void Save_SavesStylistToDatabase() { //Arrange Stylist testCase = new Stylist("Mindy Demby"); //Act testCase.Save(); List <Stylist> actual = Stylist.GetAll(); List <Stylist> expected = new List <Stylist> { testCase }; //Assert Assert.Equal(expected, actual); }
public void Test_DeleteStylist_True() { Stylist newStylistOne = new Stylist("Beth Jones"); Stylist newStylistTwo = new Stylist("Jeremy Myer"); newStylistOne.Save(); newStylistTwo.Save(); Stylist.Delete(newStylistOne.GetId()); List <Stylist> result = Stylist.GetAll(); List <Stylist> testList = new List <Stylist> { newStylistTwo }; Assert.Equal(testList, result); }
public void Test_Save_SavesStylistToDatabase() { //Arrange Stylist testStylist = new Stylist("Lisa", "MTuWTh", "Color and Style"); //Act testStylist.Save(); List <Stylist> result = Stylist.GetAll(); List <Stylist> testList = new List <Stylist> { testStylist }; //Assert Assert.Equal(testList, result); }
public ActionResult SpecialtyDetail(int id) { Dictionary <string, object> model = new Dictionary <string, object>(); Specialty selectedSpecialty = Specialty.Find(id); List <Stylist> specialtyStylists = selectedSpecialty.GetStylists(); List <Stylist> allStylists = Stylist.GetAll(); model.Add("specialty", selectedSpecialty); model.Add("specialtyStylists", specialtyStylists); model.Add("allStylists", allStylists); return(View(model)); }
public void Test_Save_AssignsIdToStylistObjects() { //Arrange Stylist testStylist = new Stylist("Lisa", "MTuWTh", "Color and Style"); //Act testStylist.Save(); Stylist savedStylist = Stylist.GetAll()[0]; int result = savedStylist.GetId(); int testId = testStylist.GetId(); //Assert Assert.Equal(testId, result); }
public void Test_Save_SavesStylistToDatabase() { //Arrange Stylist testStylist = new Stylist("Harry Cutter", "a great stylist", 3); testStylist.Save(); //Act List <Stylist> result = Stylist.GetAll(); List <Stylist> expectedResult = new List <Stylist> { testStylist }; //Assert Assert.Equal(result, expectedResult); }