예제 #1
0
		public void ShouldNotReturnAnyDiscountedBooksBecauseAmazonHasNoPaperbackVersions()
		{
			var amazonBookOne = new BookBuilder().WithAuthor("Author").WithTitle("Title").IsType(BookType.Hardback);
			var amazonBookTwo = new BookBuilder().WithAuthor("SomeAuthor").WithTitle("Title").IsType(BookType.Kindle);

			GivenAmazonHasTheseBooks(amazonBookOne, amazonBookTwo);
			GivenAUserWithOwnedBooks(new BookBuilder().WithAuthor("SomeAuthor").WithTitle("Title").IsType(BookType.Kindle));
			WhenTheUserRequestsAmazonBooks();
			TheDiscountOfTheBookIs(amazonBookTwo, 0);
			TheDiscountOfTheBookIs(amazonBookOne, 0);
		}
예제 #2
0
        public void ShouldNotReturnAnyDiscountedBooksBecauseAmazonHasNoPaperbackVersions()
        {
            var amazonBookOne = new BookBuilder().WithAuthor("Author").WithTitle("Title").IsType(BookType.Hardback);
            var amazonBookTwo = new BookBuilder().WithAuthor("SomeAuthor").WithTitle("Title").IsType(BookType.Kindle);

            GivenAmazonHasTheseBooks(amazonBookOne, amazonBookTwo);
            GivenAUserWithOwnedBooks(new BookBuilder().WithAuthor("SomeAuthor").WithTitle("Title").IsType(BookType.Kindle));
            WhenTheUserRequestsAmazonBooks();
            TheDiscountOfTheBookIs(amazonBookTwo, 0);
            TheDiscountOfTheBookIs(amazonBookOne, 0);
        }