public void ExecuteUpgrade()
        {
            MigrationServiceUtil.MigrateTo(migrationService, sourceConnectionString,
                MigrationServiceTestFixture.OxiteWithMissingVersion, null);
            MigrationServiceUtil.MigrateTo(migrationService, targetConnectionString,
                MigrationServiceTestFixture.OxiteWithMissingVersion, 0);

            SynchronizeDatabases synchronizeDatabases = new SynchronizeDatabases();
            synchronizeDatabases.MigrationDefinitionPath = 
                Path.Combine(Path.Combine(GetAssemblyLocation(Assembly.GetExecutingAssembly()), "Resources"), "OxiteWithMissingVersion.mdl");
            synchronizeDatabases.SourceConnectionString = sourceConnectionString;
            synchronizeDatabases.SourceDbPlatformType = string.Format("{0}, {1}",
                typeof(SQLitePlatform).FullName, typeof(SQLitePlatform).Assembly.GetName().Name);
            synchronizeDatabases.TargetConnectionString = targetConnectionString;

            Assert.IsTrue(synchronizeDatabases.Execute());

            Assert.AreEqual(new long[] { 20090323103239, 20090330170528, 20090331140131 },
                GetRegisteredMigrationVersions(targetConnectionString));
        }
        public void ExecuteDowngradeWhenNotAllowed()
        {
            MigrationServiceUtil.MigrateTo(migrationService, sourceConnectionString,
                MigrationServiceTestFixture.OxiteWithMissingVersion, 0);
            MigrationServiceUtil.MigrateTo(migrationService, targetConnectionString,
                MigrationServiceTestFixture.OxiteWithMissingVersion, null);

            SynchronizeDatabases synchronizeDatabases = new SynchronizeDatabases();
            synchronizeDatabases.MigrationDefinitionPath =
                Path.Combine(Path.Combine(GetAssemblyLocation(Assembly.GetExecutingAssembly()), "Resources"), "OxiteWithMissingVersion.mdl");
            synchronizeDatabases.SourceConnectionString = sourceConnectionString;
            synchronizeDatabases.SourceDbPlatformType = string.Format("{0}, {1}",
                typeof(SQLitePlatform).FullName, typeof(SQLitePlatform).Assembly.GetName().Name);
            synchronizeDatabases.TargetConnectionString = targetConnectionString;

            Assert.IsFalse(synchronizeDatabases.Execute());
        }