Ejemplo n.º 1
0
        public void ExportXmlTestOtherLocaleV3()
        {
            CultureInfo cultureUISave = Thread.CurrentThread.CurrentUICulture;
            CultureInfo cultureSave   = Thread.CurrentThread.CurrentCulture;

            try {
                Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("fr");

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

                string outputFile   = TestUtil.GetTestFile("exportxml\\marymoor_actual_v3.xml");
                string expectedFile = TestUtil.GetTestFile("exportxml\\marymoor_expected_v3.xml");

                Setup("exportxml\\marymoor.ppen");

                controller.ExportXml(outputFile, RectangleF.FromLTRB(-29.5F, -113.1F, 232.9F, 86.7F), 3);

                TestUtil.CompareTextFileBaseline(outputFile, expectedFile, exceptions);
                File.Delete(outputFile);
            }
            finally {
                Thread.CurrentThread.CurrentCulture   = cultureSave;
                Thread.CurrentThread.CurrentUICulture = cultureUISave;
            }
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
0
        public void ExportXmlTestV3()
        {
            Dictionary <string, string> exceptions = ExportXmlVersion3.TestFileExceptionMap();

            string outputFile   = TestUtil.GetTestFile("exportxml\\marymoor_actual_v3.xml");
            string expectedFile = TestUtil.GetTestFile("exportxml\\marymoor_expected_v3.xml");

            Setup("exportxml\\marymoor.ppen");

            controller.ExportXml(outputFile, RectangleF.FromLTRB(-29.5F, -113.1F, 232.9F, 86.7F), 3);

            TestUtil.CompareTextFileBaseline(outputFile, expectedFile, exceptions);
            File.Delete(outputFile);
        }
Ejemplo n.º 4
0
        public void ExportRelayV3()
        {
            Dictionary <string, string> exceptions = ExportXmlVersion3.TestFileExceptionMap();

            string outputFile   = TestUtil.GetTestFile("exportxml\\relay_actual_v3.xml");
            string expectedFile = TestUtil.GetTestFile("exportxml\\relay_expected_v3.xml");

            Setup("exportxml\\relay.ppen");

            controller.ExportXml(outputFile, RectangleF.FromLTRB(-22F, -270F, 257F, -54F), 3);

            TestUtil.CompareTextFileBaseline(outputFile, expectedFile, exceptions);
            File.Delete(outputFile);
        }
Ejemplo n.º 5
0
        public void ExportXml2()
        {
            Dictionary <string, string> exceptions = ExportXmlVersion3.TestFileExceptionMap();

            Setup(TestUtil.GetTestFile("relay\\relay.ppen"));
            string tempOutputFile = TestUtil.GetTestFile("relay\\doublebranch_temp.xml");
            string baselineFile   = TestUtil.GetTestFile("relay\\doublebranch_baseline2.xml");

            var teamAssignment = new RelayVariations(eventDB, CourseId(4), new RelaySettings(101, 143, 6));
            var xmlExporter    = new ExportRelayVariations3();

            xmlExporter.WriteFullXml(tempOutputFile, teamAssignment, eventDB, CourseId(4));

            TestUtil.CompareTextFileBaseline(tempOutputFile, baselineFile, exceptions);

            File.Delete(tempOutputFile);
        }