Create() public static method

public static Create ( ) : TestUI
return TestUI
Exemplo n.º 1
0
        public void ExportRouteGadget2()
        {
            string ppenFileName  = TestUtil.GetTestFile(@"routegadget\GRC.ppen");
            string xmlFileName   = TestUtil.GetTestFile(@"routegadget\GRC.xml");
            string gifFileName   = TestUtil.GetTestFile(@"routegadget\GRC.gif");
            string worldFileName = TestUtil.GetTestFile(@"routegadget\GRC.gfw");

            TestUI     ui         = TestUI.Create();
            Controller controller = ui.controller;

            bool success = controller.LoadInitialFile(ppenFileName, true);

            Assert.IsTrue(success);

            controller.MapDisplay.SetCourse(controller.GetCourseLayout());

            success = controller.ExportRouteGadget(xmlFileName, gifFileName, 3);
            Assert.IsTrue(success);

            Dictionary <string, string> exceptions = ExportXmlVersion3.TestFileExceptionMap();

            TestUtil.CompareBitmapBaseline((Bitmap)Image.FromFile(gifFileName), TestUtil.GetTestFile(@"routegadget\GRC GIF.baseline.png"));
            TestUtil.CompareTextFileBaseline(xmlFileName, TestUtil.GetTestFile(@"routegadget\GRC XML.baseline.xml"), exceptions);
            TestUtil.CompareTextFileBaseline(worldFileName, TestUtil.GetTestFile(@"routegadget\GRC World File.baseline.gfw"), exceptions);

            File.Delete(xmlFileName);
            File.Delete(gifFileName);
            File.Delete(worldFileName);
        }
Exemplo n.º 2
0
        public void Setup(string filename)
        {
            ui         = TestUI.Create();
            controller = ui.controller;
            bool success = controller.LoadInitialFile(TestUtil.GetTestFile(filename), true);

            Assert.IsTrue(success);
        }
Exemplo n.º 3
0
        public void Setup()
        {
            ui         = TestUI.Create();
            controller = ui.controller;
            eventDB    = controller.GetEventDB();

            string fileName = TestUtil.GetTestFile("modes\\crossings.ppen");

            bool success = controller.LoadInitialFile(fileName, true);

            Assert.IsTrue(success);
        }
Exemplo n.º 4
0
 public void Setup()
 {
     ui         = TestUI.Create();
     controller = ui.controller;
 }
Exemplo n.º 5
0
 public void Setup()
 {
     ui           = TestUI.Create();
     controller   = ui.controller;
     selectionMgr = controller.GetSelectionMgr();
 }