Ejemplo n.º 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);
		}
Ejemplo n.º 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));
		}
Ejemplo n.º 3
0
		private XmlDocument PopulateDefinitionsInDom(string entriesXml)
		{
			XmlDocument doc = new XmlDocument();
			CreateLiftFileForTesting(Validator.LiftVersion, entriesXml);
			LiftPreparer preparer = new LiftPreparer(_liftFilePath);
			preparer.PopulateDefinitions(new ProgressState());
			Assert.IsTrue(File.Exists(_liftFilePath));
			doc.Load(_liftFilePath);
			return doc;
		}