예제 #1
0
 public override bool Equals(System.Object otherStylists)
 {
     if (!(otherStylists is Stylists))
     {
         return(false);
     }
     else
     {
         Stylists newStylists  = (Stylists)otherStylists;
         bool     idEquality   = (this.GetId() == newStylists.GetId());
         bool     nameEquality = (this.GetName() == newStylists.GetName());
         return(idEquality && nameEquality);
     }
 }
예제 #2
0
        public void Test_Update_UpdatesStylistsInDatabase()
        {
            //Arrange
            string   name         = "Nick";
            Stylists testStylists = new Stylists(name);

            testStylists.Save();
            string newName = "Jacob";

            //Act
            testStylists.Update("Jacob");
            string result = testStylists.GetName();

            //Assert
            Assert.Equal(newName, result);
        }