public override bool Equals(System.Object otherStylist) { if (!(otherStylist is Stylist)) { return(false); } else { Stylist newStylist = (Stylist)otherStylist; return(this.GetId() == newStylist.GetId() && this.GetName() == newStylist.GetName() && this.GetRating() == newStylist.GetRating()); } }
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(); bool locationEquality = this.GetLocation() == newStylist.GetLocation(); return(idEquality && nameEquality && locationEquality); } }
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()); bool phoneEquality = (this.GetPhone() == newStylist.GetPhone()); bool emailEquality = (this.GetEmail() == newStylist.GetEmail()); return(idEquality && nameEquality && phoneEquality && emailEquality); } }
public void Test_Update_UpdatesStylistInDatabase() { string name = "Rebecca"; Stylist testStylist = new Stylist(name); testStylist.Save(); string newName = "Becky"; testStylist.Update(newName); string result = testStylist.GetName(); Assert.Equal(newName, result); }