本文整理汇总了C#中TestEnvironment.GetFileVersion方法的典型用法代码示例。如果您正苦于以下问题:C# TestEnvironment.GetFileVersion方法的具体用法?C# TestEnvironment.GetFileVersion怎么用?C# TestEnvironment.GetFileVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestEnvironment
的用法示例。
在下文中一共展示了TestEnvironment.GetFileVersion方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Migrate_PalsoAndFlexHaveSameFileName_PrefersFlex
public void Migrate_PalsoAndFlexHaveSameFileName_PrefersFlex()
{
using (var e = new TestEnvironment())
{
TestEnvironment.WritePalasoFile("qaa-x-bogus", "bogusPalaso", TestEnvironment.LdmlV0);
TestEnvironment.WriteFlexFile("qaa-x-bogus", "bogusFlex", TestEnvironment.LdmlV0);
var m = new GlobalWritingSystemRepositoryMigrator(e.BasePath, e.OnMigrateCallback);
m.Migrate();
Assert.AreEqual(WritingSystemDefinition.LatestWritingSystemDefinitionVersion, e.GetFileVersion("qaa-x-bogus.ldml"));
AssertThatXmlIn.String(e.MigratedLdml("qaa-x-bogus.ldml")).HasAtLeastOneMatchForXpath(
"ldml/special/palaso:abbreviation[@value='bogusFlex']",
e.NamespaceManager
);
}
}
示例2: Migrate_LdmlContainsWritingSystemThatIsVersion0_MigratedToLatest
public void Migrate_LdmlContainsWritingSystemThatIsVersion0_MigratedToLatest()
{
using (var environment = new TestEnvironment())
{
const string fileName = "en-Zxxx-x-audio.ldml";
environment.WriteLdmlFile(fileName, LdmlContentForTests.Version0("en", "Zxxx", "", "x-audio"));
var migrator = new LdmlInFolderWritingSystemRepositoryMigrator(environment.LdmlPath, environment.OnMigrateCallback);
migrator.Migrate();
Assert.AreEqual(LdmlDataMapper.CurrentLdmlVersion, environment.GetFileVersion(fileName));
}
}
示例3: Migrate_WithCurrentFlexFile_FileCopiedToRepo
public void Migrate_WithCurrentFlexFile_FileCopiedToRepo()
{
using (var e = new TestEnvironment())
{
TestEnvironment.WriteFlexFile("qaa-x-bogus", "bogus", TestEnvironment.LdmlV1);
var m = new GlobalWritingSystemRepositoryMigrator(e.BasePath, e.OnMigrateCallback);
m.Migrate();
Assert.AreEqual(WritingSystemDefinition.LatestWritingSystemDefinitionVersion, e.GetFileVersion("qaa-x-bogus.ldml"));
}
}
示例4: Migrate_FileIsVersion0_IsMigratedToLatestVersion
public void Migrate_FileIsVersion0_IsMigratedToLatestVersion()
{
using (var environment = new TestEnvironment())
{
environment.WriteLdmlFile("test.ldml", LdmlContentForTests.Version0("en", "", "", ""));
var migrator = new LdmlInFolderWritingSystemRepositoryMigrator(environment.LdmlPath, environment.OnMigrateCallback);
migrator.Migrate();
Assert.AreEqual(LdmlDataMapper.CurrentLdmlVersion, environment.GetFileVersion(environment.MappedFilePath("test.ldml")));
}
}