Exemplo n.º 1
0
 public override void CallingColumnExistsReturnsFalseIfColumnDoesNotExistWithSchema()
 {
     using (var table = new Db2TestTable(Processor, "TstSchma", "ID INT"))
     {
         Processor.ColumnExists("TstSchma", table.Name, "DoesNotExist").ShouldBeFalse();
     }
 }
Exemplo n.º 2
0
 public override void CallingColumnExistsCanAcceptTableNameWithSingleQuote()
 {
     using (var table = new Db2TestTable("Test'Table", Processor, null, "ID INT"))
     {
         Processor.ColumnExists(null, table.Name, "ID").ShouldBeTrue();
     }
 }
Exemplo n.º 3
0
 public override void CallingColumnExistsReturnsFalseIfColumnDoesNotExist()
 {
     using (var table = new Db2TestTable(Processor, null, "ID INT"))
     {
         Processor.ColumnExists(null, table.Name, "DoesNotExist").ShouldBeFalse();
     }
 }
Exemplo n.º 4
0
 public override void CallingColumnExistsReturnsTrueIfColumnExists()
 {
     using (var table = new Db2TestTable(Processor, null, "ID INT"))
     {
         Processor.ColumnExists(null, table.Name, "ID").ShouldBeTrue();
     }
 }
Exemplo n.º 5
0
 public override void CallingSchemaExistsReturnsTrueIfSchemaExists()
 {
     using (var table = new Db2TestTable(Processor, "TstSchma", "ID INT"))
     {
         Processor.SchemaExists("TstSchma").ShouldBeTrue();
     }
 }
Exemplo n.º 6
0
 public override void CallingTableExistsReturnsTrueIfTableExistsWithSchema()
 {
     using (var table = new Db2TestTable(Processor, "TstSchma", "ID INT"))
     {
         Processor.TableExists("TstSchma", table.Name).ShouldBeTrue();
     }
 }
Exemplo n.º 7
0
 public void CallingTableExistsReturnsFalseIfTableExistsInDifferentSchema()
 {
     using (var table = new Db2TestTable(Processor, "TstSchma", "ID INT"))
     {
         Processor.TableExists("DNE", table.Name).ShouldBeFalse();
     }
 }
Exemplo n.º 8
0
 public override void CallingConstraintExistsReturnsTrueIfConstraintExists()
 {
     using (var table = new Db2TestTable(Processor, null, "ID INT"))
     {
         table.WithUniqueConstraintOn("ID", "C1");
         Processor.ConstraintExists(null, table.Name, "C1").ShouldBeTrue();
     }
 }
Exemplo n.º 9
0
 public override void CallingConstraintExistsCanAcceptTableNameWithSingleQuote()
 {
     using (var table = new Db2TestTable("Test'Table", Processor, null, "ID INT"))
     {
         table.WithUniqueConstraintOn("ID", "C'1");
         Processor.ConstraintExists(null, table.Name, "C'1").ShouldBeTrue();
     }
 }
Exemplo n.º 10
0
 public void CallingConstraintExistsReturnsFalseIfConstraintExistsInDifferentSchema()
 {
     using (var table = new Db2TestTable(Processor, "TstSchma", "ID INT"))
     {
         table.WithUniqueConstraintOn("ID", "c1");
         Processor.ConstraintExists("DNE", table.Name, "c1").ShouldBeFalse();
     }
 }
Exemplo n.º 11
0
 public override void CallingConstraintExistsReturnsTrueIfConstraintExistsWithSchema()
 {
     using (var table = new Db2TestTable(Processor, "TstSchma", "ID INT NOT NULL"))
     {
         table.WithUniqueConstraintOn("ID", "C1");
         Processor.ConstraintExists("TstSchma", table.Name, "C1").ShouldBeTrue();
     }
 }
Exemplo n.º 12
0
 public override void CallingIndexExistsReturnsTrueIfIndexExists()
 {
     using (var table = new Db2TestTable(Processor, null, "ID INT"))
     {
         table.WithIndexOn("ID", "UI_id");
         Processor.IndexExists(null, table.Name, "UI_id").ShouldBeTrue();
     }
 }
Exemplo n.º 13
0
 public override void CallingIndexExistsCanAcceptTableNameWithSingleQuote()
 {
     using (var table = new Db2TestTable("Test'Table", Processor, null, "ID INT"))
     {
         table.WithIndexOn("ID", "UI_id");
         Processor.IndexExists(null, table.Name, "UI_id").ShouldBeTrue();
     }
 }
Exemplo n.º 14
0
        public override void CallingColumnExistsCanAcceptColumnNameWithSingleQuote()
        {
            var columnName = Quoter.Quote("I'D") + " INT";

            using (var table = new Db2TestTable(Processor, null, columnName))
            {
                Processor.ColumnExists(null, table.Name, "I'D").ShouldBeTrue();
            }
        }