Пример #1
0
		public void MigrateIfNeeded_AlreadyCurrentLift_LiftUntouched()
		{
			CreateLiftFileForTesting(Validator.LiftVersion);
			DateTime startModTime = File.GetLastWriteTimeUtc(_liftFilePath);
			LiftPreparer preparer = new LiftPreparer(_liftFilePath);
			Assert.IsTrue(preparer.MigrateIfNeeded(), "MigrateIfNeeded Failed");
			DateTime finishModTime = File.GetLastWriteTimeUtc(_liftFilePath);
			Assert.AreEqual(startModTime, finishModTime);
		}
Пример #2
0
		public void MigrateIfNeeded_GivenLiftVersionPoint10_LiftFileHasCurrentLiftVersionNumber()
		{
			//nb: most migration testing is done in the LiftIO library where the actual
			//  migration happens.  So here we're ensuring that the migration mechanism was
			//  triggered, and that the process left us with a modified (but not renamed)
			//  lift file.
			//nb: 0.10 was the first version where we started provinding a migration path.
			//FLEx support for Lift started with 0.12
			CreateLiftFileForTesting("0.10");
			LiftPreparer preparer = new LiftPreparer(_liftFilePath);
			Assert.IsTrue(preparer.MigrateIfNeeded(), "MigrateIfNeeded Failed");
			Assert.AreEqual(Validator.LiftVersion, Validator.GetLiftVersion(_liftFilePath));
		}