Beispiel #1
0
        public void TwoDaysSetsTwoDaysPrice()
        {
            var movieOffer = new MovieOffer
            {
                MovieId = "123asd",
                Title   = "Movie title",
                Price   = new MoviePrice(_twoDaysPrice, _lifeLongPrice)
            };

            var purchasedMovie = PurchasedMovie.TwoDays(movieOffer);

            Assert.Equal(_twoDaysPrice, purchasedMovie.Price);
        }
Beispiel #2
0
        public void TwoDaysSetsExpirationTwoDaysInFuture()
        {
            var movieOffer = new MovieOffer
            {
                MovieId = "123asd",
                Title   = "Movie title",
                Price   = new MoviePrice(_twoDaysPrice, _lifeLongPrice)
            };

            _dateProviderMock.Setup(dateProvider => dateProvider.Now())
            .Returns(new DateTime(2019, 7, 15));

            var purchasedMovie = PurchasedMovie.TwoDays(movieOffer);

            Assert.Equal(new DateTime(2019, 7, 17), purchasedMovie.Expiration);
        }