コード例 #1
0
        public void T6_Update_UpdatesStylistInDB()
        {
            Stylist testStylist = new Stylist("Jake", "Shears", "L.5 Master");

            testStylist.Save();

            string newExpertise = "Lvl. 15 Grand Master";

            testStylist.Update(newExpertise);

            string resultExpertise = testStylist.GetExpertise();

            Assert.Equal(newExpertise, resultExpertise);
        }
コード例 #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    firstNameEquality = this.GetFirstName() == newStylist.GetFirstName();
                bool    lastNameEquality  = this.GetLastName() == newStylist.GetLastName();
                bool    expertiseEquality = this.GetExpertise() == newStylist.GetExpertise();

                return(idEquality && firstNameEquality && lastNameEquality && expertiseEquality);
            }
        }