Beispiel #1
0
        public void CheckIn_MakeCheckInEqualToTrue()
        {
            DateTime dueDate     = new DateTime(2017, 1, 1);
            Checkout newCheckout = new Checkout(1, 2, dueDate);

            newCheckout.Save();

            newCheckout.CheckIn();

            bool expectedResult = true;
            bool actualResult   = newCheckout.GetCheckInStatus();

            Assert.Equal(expectedResult, actualResult);
        }
Beispiel #2
0
 public override bool Equals(System.Object otherCheckout)
 {
     if (!(otherCheckout is Checkout))
     {
         return(false);
     }
     else
     {
         Checkout newCheckout      = (Checkout)otherCheckout;
         bool     idEquality       = (this.GetId() == newCheckout.GetId());
         bool     copyIdEquality   = (this.GetCopyId() == newCheckout.GetCopyId());
         bool     patronIdEquality = (this.GetPatronId() == newCheckout.GetPatronId());
         bool     dueEquality      = (this.GetDueDate() == newCheckout.GetDueDate());
         bool     checkInEquality  = (this.GetCheckInStatus() == newCheckout.GetCheckInStatus());
         return(idEquality && copyIdEquality && patronIdEquality && dueEquality && checkInEquality);
     }
 }