public void RealDatabaseShouldUnapplyMigrationsByExecutingSql()
        {
            var tranection  = new TrannectionTraceOnly().BeginCapturing();
            var testSubject = new DatabaseRemote(tranection, DbEngine.None);

            testSubject.Unapply(Migration3);
            testSubject.Unapply(Migration2);
            tranection.SqlExecuted.Should().Equal(new[] { Migration3.Unapply, Migration2.Unapply });
        }
        public void ProductionRemoteDatabaseShouldNotRemoveTestData()
        {
            var tranection  = new TrannectionTraceOnly().BeginCapturing();
            var testSubject = new DatabaseRemote(tranection, DbEngine.None);

            testSubject.Unapply(Migration3);
            testSubject.Unapply(Migration2);
            tranection.SqlExecuted.Should().Equal(new[] { Migration3.Unapply, Migration2.Unapply });
        }
        public void RealDatabaseShouldNoOpToUnapplyMigrationsWhichDoNothingWhenUnapplied()
        {
            var tranection  = new TrannectionTraceOnly().BeginCapturing();
            var testSubject = new DatabaseRemote(tranection, DbEngine.None);

            testSubject.Unapply(MigrationEmpty);
            tranection.SqlExecuted.Should().BeEmpty();
        }
        public void ShouldNeverDeleteTestDataWhichIsNoOp()
        {
            var tranection  = new TrannectionTraceOnly().BeginCapturing();
            var testSubject = new DatabaseRemote(tranection, DbEngine.None)
            {
                IsTestDatabase = true
            };

            testSubject.Unapply(MigrationWithoutTestData);
            tranection.SqlExecuted.Should().Equal(new[] { MigrationWithoutTestData.Unapply });
        }