public void ValidateTasksSuccessful()
        {
            IList<IMigrationTask> migrations = new List<IMigrationTask>();
            MigrationTask1 task1 = new MigrationTask1();
            MigrationTask2 task2 = new MigrationTask2();

            migrations.Add(task1);
            migrations.Add(task2);

            try
            {
                MigrationProcess process = new MigrationProcess();
                process.ValidateTasks(migrations);
            }
            catch (MigrationException)
            {
                Assert.Fail("We should not have got an exception");
            }
        }
        public void ValidateTasksTwoSameLevels()
        {
            IList<IMigrationTask> migrations = new List<IMigrationTask>();
            MigrationTask1 task1 = new MigrationTask1();
            task1.Level = 1;
            MigrationTask2 task2 = new MigrationTask2();
            task2.Level = 1;

            migrations.Add(task1);
            migrations.Add(task2);

            try
            {
                MigrationProcess process = new MigrationProcess();
                process.ValidateTasks(migrations);
            }
            catch (MigrationException me)
            {
                Assert.AreEqual(me.Message, "Migration task '" + task2.Name + " ["
                    + typeof(MigrationTask2).FullName + "]' has a conflicting patch level with '"
                    + task1.Name + " [" + typeof(MigrationTask1).FullName
                    + "]'; both are configured for patch level 1");
                throw me;
            }
        }
        public void ValidateTasksNoLevelSet()
        {
            IList<IMigrationTask> migrations = new List<IMigrationTask>();
            MigrationTask1 task = new MigrationTask1();
            task.Level = null;
            migrations.Add(task);

            try
            {
                MigrationProcess process = new MigrationProcess();
                process.ValidateTasks(migrations);
            }
            catch (MigrationException me)
            {
                Assert.AreEqual(me.Message, "Migration task '" + task.Name + " ["
                    + typeof(MigrationTask1).FullName + "]' does not have a patch level defined.");
                throw me;
            }
        }