Example #1
0
        public static IEnumerable <object[]> DiscountedProductsGet4thFree()
        {
            var products = new List <IProductLineItem> {
                TestMockProductsLineItems.MilkItem(), TestMockProductsLineItems.MilkItem(), TestMockProductsLineItems.MilkItem(), TestMockProductsLineItems.MilkItem()
            };
            var products2 = new List <IProductLineItem> {
                TestMockProductsLineItems.MilkItem(), TestMockProductsLineItems.MilkItem(), TestMockProductsLineItems.MilkItem(), TestMockProductsLineItems.MilkItem(), TestMockProductsLineItems.MilkItem()
            };
            var products3 = new List <IProductLineItem> {
                TestMockProductsLineItems.MilkItem(), TestMockProductsLineItems.MilkItem(), TestMockProductsLineItems.MilkItem(), TestMockProductsLineItems.MilkItem(),
                TestMockProductsLineItems.MilkItem(), TestMockProductsLineItems.MilkItem(), TestMockProductsLineItems.MilkItem(), TestMockProductsLineItems.MilkItem()
            };

            yield return(new object[] { products, 3.45m });

            yield return(new object[] { products2, 4.60m });

            yield return(new object[] { products3, 6.90m });
        }
Example #2
0
        public static IEnumerable <object[]> Products()
        {
            var products = new List <Product> {
                TestMockProductsLineItems.BreadItem().Product
            };
            var products2 = new List <Product> {
                TestMockProductsLineItems.BreadItem().Product, TestMockProductsLineItems.BreadItem().Product
            };
            var products3 = new List <Product> {
                TestMockProductsLineItems.BreadItem().Product, TestMockProductsLineItems.ButterItem().Product, TestMockProductsLineItems.MilkItem().Product
            };
            var products4 = new List <Product> {
                TestMockProductsLineItems.BreadItem().Product, TestMockProductsLineItems.ButterItem().Product, TestMockProductsLineItems.MilkItem().Product, TestMockProductsLineItems.MilkItem().Product
            };

            yield return(new object[] { products, 1, 1.00m });

            yield return(new object[] { products2, 1, 2.00m }); // Line items should still be 1 but total 2

            yield return(new object[] { products3, 3, 2.95m });

            yield return(new object[] { products4, 3, 4.10m });
        }