public void CreateTableUpAutoReversingMigrationGivesDeleteTableDown()
        {
            var autoReversibleMigration = new TestAutoReversingMigration();
            context.Object.Expressions = new Collection<IMigrationExpression>();
            autoReversibleMigration.GetDownExpressions(context.Object);

            Assert.True(context.Object.Expressions.Any(me => me is DeleteTableExpression && ((DeleteTableExpression)me).TableName == "Foo"));
        }
        public void DownMigrationsAreInReverseOrderOfUpMigrations()
        {
            var autoReversibleMigration = new TestAutoReversingMigration();
            context.Object.Expressions = new Collection<IMigrationExpression>();
            autoReversibleMigration.GetDownExpressions(context.Object);

            Assert.IsAssignableFrom(typeof(RenameTableExpression), context.Object.Expressions.ToList()[0]);
            Assert.IsAssignableFrom(typeof(DeleteTableExpression), context.Object.Expressions.ToList()[1]);
        }
        public void CreateTableUpAutoReversingMigrationGivesDeleteTableDown()
        {
            var autoReversibleMigration = new TestAutoReversingMigration();

            _context.Object.Expressions = new Collection <IMigrationExpression>();
            autoReversibleMigration.GetDownExpressions(_context.Object);

            Assert.True(_context.Object.Expressions.Any(me => me is DeleteTableExpression && ((DeleteTableExpression)me).TableName == "Foo"));
        }
        public void DownMigrationsAreInReverseOrderOfUpMigrations()
        {
            var autoReversibleMigration = new TestAutoReversingMigration();

            _context.Object.Expressions = new Collection <IMigrationExpression>();
            autoReversibleMigration.GetDownExpressions(_context.Object);

            Assert.IsAssignableFrom(typeof(RenameTableExpression), _context.Object.Expressions.ToList()[0]);
            Assert.IsAssignableFrom(typeof(DeleteTableExpression), _context.Object.Expressions.ToList()[1]);
        }