当前位置: 首页>>代码示例>>C#>>正文


C# TestEnvironment.GetFileVersion方法代码示例

本文整理汇总了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
				);
			}
		}
开发者ID:JohnThomson,项目名称:libpalaso,代码行数:16,代码来源:GlobalWritingSystemRepositoryMigratorTests.cs

示例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));
			}
		}
开发者ID:jwickberg,项目名称:libpalaso,代码行数:13,代码来源:LdmlInFolderWritingSystemRepositoryMigratorTests.cs

示例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"));
			}
		}
开发者ID:JohnThomson,项目名称:libpalaso,代码行数:11,代码来源:GlobalWritingSystemRepositoryMigratorTests.cs

示例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")));
			}
		}
开发者ID:jwickberg,项目名称:libpalaso,代码行数:12,代码来源:LdmlInFolderWritingSystemRepositoryMigratorTests.cs


注:本文中的TestEnvironment.GetFileVersion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。