public void WritingSystemLdmlVerisonGetterGetFileVerison_FileIsVersion3_Returns3() { using (_environment = new TestEnvironment()) { _environment.WriteContentToWritingSystemLdmlFile(LdmlContentForTests.Version3("en", "", "", "")); var versionGetter = new WritingSystemLdmlVersionGetter(); Assert.That(versionGetter.GetFileVersion(_environment.PathToWritingSystemLdmlFile), Is.EqualTo(3)); } }
public void GetFileVersion_StandardLdml_LatestVersion() { string xml = LdmlContentForTests.Version3("en", "Latn", "", ""); using (var file = new TempFile(xml)) { var silLdmlVersion = new SilLdmlVersion(); int result = silLdmlVersion.GetFileVersion(file.Path); Assert.That(result, Is.EqualTo(LdmlDataMapper.CurrentLdmlVersion)); } }
public void CorrectlyAppendsLdmlVersion3ToBranchName() { using (var liftProject = new TemporaryFolder("TempProj_LIFT")) using (var liftFile = new TempFileFromFolder(liftProject, "proj.lift", TestLift13File)) { var wsDirectory = Directory.CreateDirectory(Path.Combine(Path.GetDirectoryName(liftFile.Path), "WritingSystems")); using (var writingSystemsDir = TempFileFromFolder.CreateAt(liftProject.Combine("WritingSystems", "lang.ldml"), LdmlContentForTests.Version3("en", "", "", ""))) { var syncAdjunct = new LiftSynchronizerAdjunct(liftFile.Path); Assert.AreEqual("LIFT0.13_ldml3", syncAdjunct.BranchName, "BranchName should be 'LIFT0.13_ldml3' with version 3 ldml files"); } } }