コード例 #1
0
        public void Stylist_Update_UpdatesTelephone()
        {
            Stylist newStylist = new Stylist("John Smith", "(123)-456-7890");

            newStylist.Save();

            newStylist.Update("John Locke", "(481)-347-1234");

            Assert.Equal("(481)-347-1234", newStylist.GetTelephone());
        }
コード例 #2
0
 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    telephoneEquality = this.GetTelephone() == newStylist.GetTelephone();
         return(idEquality && nameEquality && telephoneEquality);
     }
 }