Exemple #1
0
        public void Create_Painting_Report_Will_Return_Number_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 paintingReport = _toyBlockFactory.GetDailyPaintingReport();

            Assert.Equal(2, paintingReport.GetShapeColorTotal(Shape.Square, Color.Red));
            Assert.Equal(2, paintingReport.GetShapeColorTotal(Shape.Triangle, Color.Blue));
        }
        public void Daily_Total()
        {
            var paintingReport = _toyBlockFactory.GetDailyPaintingReport();

            Assert.Equal(2, paintingReport.GetShapeColorTotal(Shape.Circle, Color.Blue));
        }