public void ExportXmlTestOtherLocaleV2() { CultureInfo cultureUISave = Thread.CurrentThread.CurrentUICulture; CultureInfo cultureSave = Thread.CurrentThread.CurrentCulture; try { Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("fr"); Dictionary <string, string> exceptions = ExportXmlVersion2.TestFileExceptionMap(); string outputFile = TestUtil.GetTestFile("exportxml\\marymoor_actual.xml"); string expectedFile = TestUtil.GetTestFile("exportxml\\marymoor_expected.xml"); Setup("exportxml\\marymoor.ppen"); controller.ExportXml(outputFile, RectangleF.FromLTRB(-29.5F, -113.1F, 232.9F, 86.7F), 2); TestUtil.CompareTextFileBaseline(outputFile, expectedFile, exceptions); File.Delete(outputFile); } finally { Thread.CurrentThread.CurrentCulture = cultureSave; Thread.CurrentThread.CurrentUICulture = cultureUISave; } }
public void ExportRouteGadget() { string ppenFileName = TestUtil.GetTestFile(@"routegadget\Sample Event.ppen"); string xmlFileName = TestUtil.GetTestFile(@"routegadget\Sample Event.xml"); string gifFileName = TestUtil.GetTestFile(@"routegadget\Sample Event.gif"); 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, 2); Assert.IsTrue(success); Dictionary <string, string> exceptions = ExportXmlVersion2.TestFileExceptionMap(); TestUtil.CompareBitmapBaseline((Bitmap)Image.FromFile(gifFileName), TestUtil.GetTestFile(@"routegadget\Sample Event GIF.baseline.png")); TestUtil.CompareTextFileBaseline(xmlFileName, TestUtil.GetTestFile(@"routegadget\Sample Event XML.baseline.xml"), exceptions); File.Delete(xmlFileName); File.Delete(gifFileName); }
public void ExportXmlTestV2() { Dictionary <string, string> exceptions = ExportXmlVersion2.TestFileExceptionMap(); string outputFile = TestUtil.GetTestFile("exportxml\\marymoor_actual.xml"); string expectedFile = TestUtil.GetTestFile("exportxml\\marymoor_expected.xml"); Setup("exportxml\\marymoor.ppen"); controller.ExportXml(outputFile, RectangleF.FromLTRB(-29.5F, -113.1F, 232.9F, 86.7F), 2); TestUtil.CompareTextFileBaseline(outputFile, expectedFile, exceptions); File.Delete(outputFile); }
public void ExportRelayV2() { Dictionary <string, string> exceptions = ExportXmlVersion2.TestFileExceptionMap(); string outputFile = TestUtil.GetTestFile("exportxml\\relay_actual.xml"); string expectedFile = TestUtil.GetTestFile("exportxml\\relay_expected.xml"); Setup("exportxml\\relay.ppen"); controller.ExportXml(outputFile, RectangleF.FromLTRB(-22F, -270F, 257F, -54F), 2); TestUtil.CompareTextFileBaseline(outputFile, expectedFile, exceptions); File.Delete(outputFile); }