public void CanApplyForeignKeyConvention() { var connection = new SqlConnection(sqlServerConnectionString); connection.Open(); var processor = new SqlServerProcessor(connection, new SqlServerGenerator()); var conventions = new MigrationConventions(); var runner = new MigrationRunner(conventions, processor); runner.Up(new TestForeignKeyNamingConvention()); processor.TableExists("Users").ShouldBeTrue(); processor.ConstraintExists( "Users", "FK_Users_GroupId_Groups_GroupId").ShouldBeTrue(); runner.Down(new TestForeignKeyNamingConvention()); processor.TableExists("Users").ShouldBeFalse(); }