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; } }
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); }
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); }
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); }
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); }