public void GetFileVersion_WithoutLdml_ReturnsBadVersion() { string xml = LdmlContentForTests.NoLdml; using (var file = new TempFile(xml)) { var silLdmlVersion = new SilLdmlVersion(); int result = silLdmlVersion.GetFileVersion(file.Path); Assert.That(result, Is.EqualTo(SilLdmlVersion.BadVersion)); } }
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 GetFileVersion_SilIdentity_LatestVersion() { string xml = LdmlContentForTests.Version3Identity("en", "Latn", "", "", "123456", "abcd", "variantName", "US", "53d542ba498f40f437f7723e69dcf64dab6c9794"); using (var file = new TempFile(xml)) { var silLdmlVersion = new SilLdmlVersion(); int result = silLdmlVersion.GetFileVersion(file.Path); Assert.That(result, Is.EqualTo(LdmlDataMapper.CurrentLdmlVersion)); } }