Example #1
0
 public void T5_Find_FindNameInDatabase()
 {
     //arrange
       Client testClient = new Client("Jill", 1);
       testClient.Save();
       //act
       Client foundClient = Client.Find(testClient.GetId());
       //Assert
       Assert.Equal(testClient, foundClient);
 }
Example #2
0
        public void T4_Save_AssignsIdToObject()
        {
            //arrange
              Client testClient = new Client("Jill", 1);
              //act
              testClient.Save();
              Client savedClient = Client.GetAll()[0];

              int result = savedClient.GetId();
              int testId = testClient.GetId();
              //Assert
              Assert.Equal(testId, result);
        }