public void ExporterGetsFileName() { using (var sample = new ResxWithStaleCorrespondingXlf()) { var doc = new XlfDocument(sample.XlfFileName); var file = doc.Files.First(); var exporter = new TestXlfExporter(); var fileName = Guid.NewGuid().ToString(); file.Export(fileName, exporter, null, null, XlfDialect.Standard); Assert.AreEqual(exporter.File, fileName); } }
public void ExporterGetsTransUnits() { using (var sample = new ResxWithStaleCorrespondingXlf()) { var doc = new XlfDocument(sample.XlfFileName); var file = doc.Files.First(); var exporter = new TestXlfExporter(); file.Export(null, exporter, null, null, XlfDialect.Standard); Assert.IsTrue(exporter.Units.Count > 0); Assert.AreEqual(exporter.Units.Count, file.TransUnits.Count()); } }
public void ExporterGetsOnlyFilteredItems() { using (var sample = new ResxWithStaleCorrespondingXlf()) { var doc = new XlfDocument(sample.XlfFileName); var file = doc.Files.First(); var exporter = new TestXlfExporter(); file.Export(null, exporter, new List <string>() { "this-state-does-not-exist" }, null, XlfDialect.Standard); Assert.AreEqual(exporter.Units.Count, 0); file.Export(null, exporter, new List <string>() { "this-state-does-not-exist", "final" }, null, XlfDialect.Standard); Assert.IsTrue(exporter.Units.Count > 0); } }