public void ApplyFamilyDiscount() { double bookOrderWithDiscount = 0; double expected = 14; if (booking.IsFamilyDiscount(bookOrder)) { bookOrderWithDiscount = booking.ApplyFamilyDiscount(bookOrder, bookOrder.RentalType).Price; Assert.AreEqual(bookOrderWithDiscount, expected); } else { Assert.AreSame(bookOrder, booking.ApplyFamilyDiscount(bookOrder, bookOrder.RentalType)); } }