public async Task MigrateGroup1AgainstActualServer() { var dbManipulator = new DbManipulator(new SqlServerDbAdapter(_scp), typeof(RunMigrationsTest).Assembly, new[] { "Group1" }); dbManipulator.ShowSql = true; await dbManipulator.CreateAndUpdateDatabase(); }
public async Task MigrateGroup2() { Func <Task> failCreatingDatabase = new Func <Task>(async() => { var dbManipulator = new DbManipulator(new SqlServerDbAdapter(_scp), typeof(RunMigrationsTest).Assembly, new[] { "Group1" }); await dbManipulator.CreateAndUpdateDatabase(); }); await failCreatingDatabase.Should() .ThrowAsync <Exception>( $"This fails because FluentMigrator doesn't sequence operations in appropriate order. {nameof(DbModelFactory)} can help topologically sort create statements to prevent this."); }