public void Removed()
        {
            IColumn column = GetColumn();
            IMergeOperation<IColumn> op = new ColumnRemovalOperation(column);

            string actual = op.ToString();
            StringAssert.Contains("Column0011", actual);
            StringAssert.Contains("Removed", actual);
        }
Exemplo n.º 2
0
        public void Removed()
        {
            IColumn column = GetColumn();
            IMergeOperation <IColumn> op = new ColumnRemovalOperation(column);

            string actual = op.ToString();

            StringAssert.Contains("Column0011", actual);
            StringAssert.Contains("Removed", actual);
        }
Exemplo n.º 3
0
            public void The_Original_Database_Should_Not_Contain_The_Removed_Column()
            {
                var db1 = TestDatabaseLoader.TestDatabase();

                IColumn oldColumn         = db1.Tables[0].Columns[0];
                ColumnRemovalOperation op = new ColumnRemovalOperation(db1.Tables[0].Columns[0]);

                op.RunOperation();

                Assert.That(db1.Tables[0].Columns, Has.Count(2));
                Assert.That(db1.Tables[0].Columns.Contains(oldColumn), Is.False);
                Assert.That(db1.Tables[0].Keys[0].Columns, Has.Count(1), "The column should have been removed from the primary key");
                Assert.That(db1.Tables[0].Indexes[0].Columns, Is.Empty, "The column should have been removed from the unique index");
            }
            public void The_Original_Database_Should_Not_Contain_The_Removed_Column()
            {
                var db1 = TestDatabaseLoader.TestDatabase();

                IColumn oldColumn = db1.Tables[0].Columns[0];
                ColumnRemovalOperation op = new ColumnRemovalOperation(db1.Tables[0].Columns[0]);
                op.RunOperation();

                Assert.That(db1.Tables[0].Columns, Has.Count(2));
                Assert.That(db1.Tables[0].Columns.Contains(oldColumn), Is.False);
                Assert.That(db1.Tables[0].Keys[0].Columns, Has.Count(1), "The column should have been removed from the primary key");
                Assert.That(db1.Tables[0].Indexes[0].Columns, Is.Empty, "The column should have been removed from the unique index");
            }