Draw() public method

public Draw ( Window window ) : void
window GoF.Lexi.Application.GUI.Window
return void
Beispiel #1
0
        public void Draw_Row_With_Rectangle_And_Circle_First_With_SpacesStrategy_Then_With_BracketsStrategy()
        {
            Row row = new Row(new SpacesStrategy());

            row.Insert(new Circle());
            row.Insert(new Rectangle());

            row.Draw(window);

            row.strategy = new SquareBracketsStrategy();

            row.Draw(window);

            Assert.AreEqual("(Circle), (Rectangle)[Circle], [Rectangle]", window.DrawnText);
        }
Beispiel #2
0
        public void Create_Composite_Of_A_Rectangle_And_A_Circle()
        {
            Row row = new Row();

            row.Insert(new Rectangle());
            row.Insert(new Circle());

            row.Draw(window);

            Assert.AreEqual("Rectangle, Circle", window.DrawnText);
        }
Beispiel #3
0
        public void Create_Composite_Of_Two_Rectangles()
        {
            Row row = new Row();
                        
            row.Insert(new Rectangle());
            row.Insert(new Rectangle());

            row.Draw(window);

            Assert.AreEqual("Rectangle, Rectangle", window.DrawnText);
        }
Beispiel #4
0
        public void Draw_Row_With_Two_Rectangles_With_SquareBracketsStrategy()
        {
            Row row = new Row(new SquareBracketsStrategy());

            row.Insert(new Rectangle());
            row.Insert(new Rectangle());

            row.Draw(window);

            Assert.AreEqual("[Rectangle], [Rectangle]", window.DrawnText);
        }
Beispiel #5
0
        public void Draw_Row_With_Two_Rectangles_With_SpacesStrategy()
        {
            Row row = new Row(new SpacesStrategy());

            row.Insert(new Rectangle());
            row.Insert(new Rectangle());

            row.Draw(window);

            Assert.AreEqual("(Rectangle), (Rectangle)", window.DrawnText);
        }