public override void CallingConstraintExistsReturnsFalseIfConstraintDoesNotExistWithSchema()
 {
     using (var table = new Db2TestTable(Processor, "TstSchma", "ID INT"))
     {
         Processor.ConstraintExists("TstSchma", table.Name, "DoesNotExist").ShouldBeFalse();
     }
 }
Esempio 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();
     }
 }
 public override void CallingConstraintExistsReturnsFalseIfConstraintDoesNotExist()
 {
     using (var table = new Db2TestTable(Processor, null, "ID INT"))
     {
         Processor.ConstraintExists(null, table.Name, "DoesNotExist").ShouldBeFalse();
     }
 }
 public void CallingTableExistsReturnsFalseIfTableExistsInDifferentSchema()
 {
     using (var table = new Db2TestTable(Processor, "TstSchma", "ID INT"))
     {
         Processor.TableExists("DNE", table.Name).ShouldBeFalse();
     }
 }
 public override void CallingSchemaExistsReturnsTrueIfSchemaExists()
 {
     using (var table = new Db2TestTable(Processor, "TstSchma", "ID INT"))
     {
         Processor.SchemaExists("TstSchma").ShouldBeTrue();
     }
 }
 public override void CallingTableExistsReturnsTrueIfTableExistsWithSchema()
 {
     using (var table = new Db2TestTable(Processor, "TstSchma", "ID INT"))
     {
         Processor.TableExists("TstSchma", table.Name).ShouldBeTrue();
     }
 }
 public override void CallingTableExistsReturnsTrueIfTableExists()
 {
     using (var table = new Db2TestTable(Processor, null, "ID INT"))
     {
         Processor.TableExists(null, table.Name).ShouldBeTrue();
     }
 }
 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();
     }
 }
 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();
     }
 }
 public void CallingConstraintExistsReturnsFalseIfConstraintExistsInDifferentSchema()
 {
     using (var table = new Db2TestTable(Processor, "TstSchma", "ID INT"))
     {
         table.WithUniqueConstraintOn("ID", "c1");
         Processor.ConstraintExists("DNE", table.Name, "c1").ShouldBeFalse();
     }
 }
Esempio n. 11
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();
     }
 }
 public override void CallingConstraintExistsReturnsTrueIfConstraintExists()
 {
     using (var table = new Db2TestTable(Processor, null, "ID INT"))
     {
         table.WithUniqueConstraintOn("ID", "C1");
         Processor.ConstraintExists(null, table.Name, "C1").ShouldBeTrue();
     }
 }
 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();
     }
 }