public void MigrateToLatestVersion_IsOldVersion_ReturnsDifferentPath() { string path = null; string pathMigrated = null; try { path = TempOxesFiles.MinimalVersion107File(null); pathMigrated = Migrator.MigrateToLatestVersion(path); Assert.AreNotEqual(path, pathMigrated); string errors = Validator.GetAnyValidationErrors(pathMigrated); Assert.IsNull(errors); } finally { if (!String.IsNullOrEmpty(path)) { FileUtils.Delete(path); } if (!String.IsNullOrEmpty(pathMigrated) && pathMigrated != path) { FileUtils.Delete(pathMigrated); } } }
public void WrongVersionNumberGivesHelpfulMessage() { string path = TempOxesFiles.MinimalVersion107File(null); string errors = ValidateAndDelete(path, false); Assert.IsTrue(errors.Contains("This file claims to be version")); }