public void Can_Get_Up_Migration_From_MigrationStub() { // Arrange var context = new MigrationContext(DatabaseProviders.SqlServerCE, null); var stub = new AlterUserTableMigrationStub(); // Act stub.GetUpExpressions(context); // Assert Assert.That(context.Expressions.Any(), Is.True); //Console output Console.WriteLine("Number of expressions in context: {0}", context.Expressions.Count); Console.WriteLine(""); foreach (var expression in context.Expressions) { Console.WriteLine(expression.ToString()); } }
public void Can_Get_Up_Migration_From_MigrationStub() { // Arrange var context = new MigrationContext(DatabaseProviders.SqlServerCE, null, Mock.Of <ILogger>()); var stub = new AlterUserTableMigrationStub(new SqlCeSyntaxProvider(), Mock.Of <ILogger>()); // Act stub.GetUpExpressions(context); // Assert Assert.That(context.Expressions.Any(), Is.True); //Console output Debug.Print("Number of expressions in context: {0}", context.Expressions.Count); Debug.Print(""); foreach (var expression in context.Expressions) { Debug.Print(expression.ToString()); } }
public void Can_Get_Up_Migration_From_MigrationStub() { // Arrange var context = GetMigrationContext(out var database); var stub = new AlterUserTableMigrationStub(context); // Act stub.Run(); // Assert Assert.That(database.Operations.Any(), Is.True); // Console output Debug.Print("Number of expressions in context: {0}", database.Operations.Count); Debug.Print(string.Empty); foreach (var expression in database.Operations) { Debug.Print(expression.ToString()); } }