예제 #1
0
        public void CanRent_OutDatedRental_False()
        {
            var rentals = new List <Rental>
            {
                new Rental {
                    Rented = new DateTime(1999, 1, 1)
                },
            };

            var result = ShopUserService.CanRent(rentals);

            Assert.False(result);
        }
예제 #2
0
        public void CanRent_ToManyRentals_False()
        {
            var rentals = new List <Rental>
            {
                new Rental(),
                new Rental(),
                new Rental()
            };

            var result = ShopUserService.CanRent(rentals);

            Assert.False(result);
        }
예제 #3
0
        public void CanRent_TwoRentals_True()
        {
            var rentals = new List <Rental>
            {
                new Rental {
                    Rented = new DateTime(3000, 1, 1)
                },
                new Rental {
                    Rented = new DateTime(3000, 1, 1)
                }
            };

            var result = ShopUserService.CanRent(rentals);

            Assert.True(result);
        }