public void Should_Be_Not_Null_when_BuilderCatalogCollections()
        {
            var catalogsBasket    = BookStoreUnitTestsUtility.CatalogBasketCollectionsNoDiscount();
            var catalogCollection = BuilderCatalogCollections.Create(catalogsBasket);

            Assert.IsNotNull(catalogCollection);
        }
        public void Should_Be_Have_All_Book_In_Basket()
        {
            var catalogsBasket    = BookStoreUnitTestsUtility.CatalogNoDiscountSameCategoryAndManyBooks();
            var catalogCollection = BuilderCatalogCollections.Create(catalogsBasket);

            Assert.AreEqual(catalogCollection.Sum(x => x.List.Count), catalogsBasket.Count);
        }
        public void Should_Be_Type_SameCatalogManyBooks_When_Quantity_More_Tan_1()
        {
            var catalogsBasket    = BookStoreUnitTestsUtility.CatalogManyBooksCopies();
            var catalogCollection = BuilderCatalogCollections.Create(catalogsBasket);

            Assert.AreEqual(catalogCollection.Count, 1);
            Assert.AreEqual(catalogCollection[0].Discount, DiscountType.ContainBookCopies);
        }
        public void Should_Be_Classify_Catalog_Type_NoDsicount()
        {
            var catalogsBasket    = BookStoreUnitTestsUtility.CatalogBasketCollectionsNoDiscount();
            var catalogCollection = BuilderCatalogCollections.Create(catalogsBasket);

            Assert.AreEqual(catalogCollection.Count, 1);
            Assert.AreEqual(catalogCollection.First().Discount, DiscountType.NoDiscount);
        }
        public void Should_Be_Classify_Catalog_Equal_2()
        {
            var catalogsBasket    = BookStoreUnitTestsUtility.CatalogBasketCollectionsNoDiscountAndSameCategory();
            var catalogCollection = BuilderCatalogCollections.Create(catalogsBasket);

            Assert.AreEqual(catalogCollection.Count, 2);
            Assert.AreEqual(catalogCollection[0].Discount, DiscountType.NoDiscount);
            Assert.AreEqual(catalogCollection[1].Discount, DiscountType.SameCatalogSingleBook);
        }
        public void Should_Be_Type_NoDiscount_SingleBook_ManyCopies()
        {
            var catalogsBasket    = BookStoreUnitTestsUtility.CatalogNoDiscountSameCategoryAndManyBooks();
            var catalogCollection = BuilderCatalogCollections.Create(catalogsBasket);

            Assert.AreEqual(catalogCollection.Count, 3);
            Assert.AreEqual(catalogCollection[0].Discount, DiscountType.NoDiscount);
            Assert.AreEqual(catalogCollection[1].Discount, DiscountType.SameCatalogSingleBook);
            Assert.AreEqual(catalogCollection[2].Discount, DiscountType.ContainBookCopies);
        }