Exemplo n.º 1
0
        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))
                {
                    File.Delete(path);
                }
                if (!String.IsNullOrEmpty(pathMigrated) && pathMigrated != path)
                {
                    File.Delete(pathMigrated);
                }
            }
        }
Exemplo n.º 2
0
        public void WrongVersionNumberGivesHelpfulMessage()
        {
            string path   = TempOxesFiles.MinimalVersion107File(null);
            string errors = ValidateAndDelete(path, false);

            Assert.IsTrue(errors.Contains("This file claims to be version"));
        }