Exemplo n.º 1
0
        public void DrawHouse()
        {
            DrawingToolTest.DrawHexagon("canvas", 600, 200, 700, 250);
            DrawingToolTest.DrawLine("canvas", 475, 200, 350, 350);
            DrawingToolTest.DrawLine("canvas", 475, 200, 600, 350);
            DrawingToolTest.DrawRectangle("canvas", 350, 350, 600, 550);
            DrawingToolTest.DrawRectangle("canvas", 600, 220, 610, 365);
            DrawingToolTest.DrawRectangle("canvas", 400, 400, 430, 430);
            DrawingToolTest.DrawRectangle("canvas", 450, 400, 480, 430);
            DrawingToolTest.DrawRectangle("canvas", 425, 440, 470, 500);
            DrawingToolTest.DrawRectangle("canvas", 510, 390, 520, 435);
            DrawingToolTest.DrawRectangle("canvas", 530, 375, 540, 430);
            DrawingToolTest.DrawRectangle("canvas", 550, 395, 565, 460);
            DrawingToolTest.MouseDragging("canvas", 565, 460, 570, 465);
            Robot.ClickButton("Undo");
            Robot.ClickButton("Redo");
            Robot.ClickButton("Save");
            Robot.ClickButton("是(Y)");
            UITestControl canvas = Robot.FindPanel("canvas");

            Mouse.Click(canvas, new Point(650, 225));
            Robot.AssertText("_shapePositionTextLabel", "Hexagon(600,200,700,250)");
            DrawingToolTest.ClickClear();
            Robot.ClickButton("Load");
            Robot.ClickButton("是(Y)");
            Mouse.Click(canvas, new Point(650, 225));
            Robot.AssertText("_shapePositionTextLabel", "Hexagon(600,200,700,250)");
            DrawingToolTest.ClickClear();
        }
Exemplo n.º 2
0
        public void SelectShapeTest()
        {
            DrawingToolTest.DrawHexagon("canvas", 250, 250, 600, 600);
            UITestControl canvas = Robot.FindPanel("canvas");

            Mouse.Click(canvas, new Point(500, 500));
            Robot.AssertText("_shapePositionTextLabel", "Hexagon(250,250,600,600)");
        }
Exemplo n.º 3
0
        public void ResizeShapeTest()
        {
            DrawingToolTest.DrawRectangle("canvas", 250, 250, 600, 600);
            DrawingToolTest.MouseDragging("canvas", 600, 600, 700, 700);
            UITestControl canvas = Robot.FindPanel("canvas");

            Mouse.Click(canvas, new Point(650, 650));
            Robot.AssertText("_shapePositionTextLabel", "Hexagon(250,250,700,700)");
            Robot.ClickButton("Undo");
            Robot.AssertText("_shapePositionTextLabel", "Hexagon(250,250,600,600)");
            Robot.ClickButton("Redo");
            Robot.AssertText("_shapePositionTextLabel", "Hexagon(250,250,700,700)");
        }
Exemplo n.º 4
0
 public void RedoTest()
 {
     DrawingToolTest.DrawHexagon("canvas", 250, 250, 600, 600);
     Robot.ClickButton("Undo");
     Robot.ClickButton("Redo");
 }
Exemplo n.º 5
0
 public void ClickClearTest()
 {
     DrawingToolTest.ClickClear();
 }
Exemplo n.º 6
0
 public void DrawHexagonTest()
 {
     DrawingToolTest.DrawHexagon("canvas", 200, 200, 300, 300);
 }
Exemplo n.º 7
0
 public void DrawLineTest()
 {
     DrawingToolTest.DrawLine("canvas", 200, 200, 300, 300);
 }
Exemplo n.º 8
0
 public void DrawRectangleTest()
 {
     // 若要為這個測試產生程式碼,請在捷徑功能表上選取 [產生自動程式化 UI 測試的程式碼],並選取其中一個功能表項目。
     DrawingToolTest.DrawRectangle("canvas", 200, 200, 300, 300);
 }