public void Daily_Total_Price()
        {
            var order = _toyBlockFactory.CreateOrder("James", "123 Smith Street, Fitzroy");

            order.AddBlock(Shape.Circle, Color.Blue);
            order.AddBlock(Shape.Square, Color.Yellow);

            var order2 = _toyBlockFactory.CreateOrder("James", "123 Smith Street, Fitzroy");

            order2.AddBlock(Shape.Circle, Color.Blue);
            order2.AddBlock(Shape.Square, Color.Yellow);

            var invoiceReport = _toyBlockFactory.GetDailyInvoiceReport();

            Assert.Equal(8, invoiceReport.GetCostTotal());
        }
Пример #2
0
        public void Create_Invoice_Report_Will_Return_Price_For_Daily_Orders()
        {
            var order = _toyBlockFactory.CreateOrder("James", "123 Smith Street, Fitzroy");

            order.AddBlock(Shape.Circle, Color.Blue);
            order.AddBlock(Shape.Square, Color.Blue);
            order.AddBlock(Shape.Square, Color.Red);

            var order2 = _toyBlockFactory.CreateOrder("James", "123 Smith Street, Fitzroy");

            order2.AddBlock(Shape.Triangle, Color.Blue);
            order2.AddBlock(Shape.Triangle, Color.Blue);
            order2.AddBlock(Shape.Triangle, Color.Yellow);
            order2.AddBlock(Shape.Square, Color.Yellow);
            order2.AddBlock(Shape.Square, Color.Red);

            var invoiceReport = _toyBlockFactory.GetDailyInvoiceReport();

            Assert.Equal(15, invoiceReport.GetCostTotal());
        }