public override bool Equals(System.Object otherStylist) { if (!(otherStylist is Stylist)) { return(false); } else { Stylist newStylist = (Stylist)otherStylist; bool idEquality = this.GetId() == newStylist.GetId(); bool nameEquality = this.GetName() == newStylist.GetName(); return(idEquality && nameEquality); } }
public void GetStylistName_ReturnsStylistName_true() { //Arrange Stylist newStylist = new Stylist("Frankie"); newStylist.Save(); Client newClient = new Client("Frances", newStylist.GetId()); newClient.Save(); string expectedResult = newStylist.GetName(); //Act string result = newClient.GetStylistName(); //Assert Assert.Equal(expectedResult, result); }
public void T7_Update_UpdateStylist() { //Arrange string name = "Jane May"; Stylist testStylist = new Stylist(name); testStylist.Save(); string newName = "Ike Lee"; //Act testStylist.Update(newName); string result = testStylist.GetName(); //Assert Assert.Equal(newName, result); }
public void Test6_Update_StylistToDatabase() { string name = "Maggy"; Stylist testStylist = new Stylist(name); testStylist.Save(); string newName = "Steve"; testStylist.Update(newName); string result = testStylist.GetName(); Assert.Equal(newName, result); }