示例#1
0
 public override void CallingTableExistsCanAcceptTableNameWithSingleQuote()
 {
     using (var table = new OracleTestTable("Test'Table", Processor, null, "id int"))
     {
         Processor.TableExists(null, table.Name).ShouldBeTrue();
     }
 }
 public void CallingTableExistsReturnsFalseIfTableExistsInDifferentSchema()
 {
     using (var table = new OracleTestTable(Processor, SchemaName, "id int"))
     {
         Processor.TableExists("testschema", table.Name).ShouldBeFalse();
     }
 }
 public override void CallingColumnExistsReturnsTrueIfColumnExists()
 {
     using (var table = new OracleTestTable(Processor, null, "id int"))
     {
         Processor.ColumnExists(null, table.Name, "id").ShouldBeTrue();
     }
 }
示例#4
0
 public override void CallingTableExistsReturnsTrueIfTableExistsWithSchema()
 {
     using (var table = new OracleTestTable(Processor, SchemaName, "id int"))
     {
         Processor.TableExists(SchemaName, table.Name).ShouldBeTrue();
     }
 }
 public override void CallingColumnExistsCanAcceptTableNameWithSingleQuote()
 {
     using (var table = new OracleTestTable("Test'Table", Processor, null, "id int"))
     {
         Processor.ColumnExists(null, table.Name, "DoesNotExist").ShouldBeFalse();
     }
 }
 public override void CallingColumnExistsReturnsFalseIfColumnDoesNotExistWithSchema()
 {
     using (var table = new OracleTestTable(Processor, SchemaName, "id int"))
     {
         Processor.ColumnExists(SchemaName, table.Name, "DoesNotExist").ShouldBeFalse();
     }
 }
 public override void CallingColumnExistsCanAcceptColumnNameWithSingleQuote()
 {
     using (var table = new OracleTestTable(Processor, null, "\"i'd\" int"))
     {
         Processor.ColumnExists(null, table.Name, "i'd").ShouldBeTrue();
     }
 }
示例#8
0
 public override void CallingIndexExistsCanAcceptTableNameWithSingleQuote()
 {
     using (var table = new OracleTestTable("Test'Table", Processor, null, "id int"))
     {
         table.WithIndexOn("ID");
         Processor.IndexExists(null, table.Name, "UI_id").ShouldBeTrue();
     }
 }
示例#9
0
 public void CallingConstraintExistsReturnsFalseIfConstraintExistsInDifferentSchema()
 {
     using (var table = new OracleTestTable(Processor, SchemaName, "id int"))
     {
         table.WithUniqueConstraintOn("ID");
         this.Processor.ConstraintExists("testschema", table.Name, "UC_id").ShouldBeFalse();
     }
 }
 public void CallingIndexExistsWithIncorrectCaseReturnsFalseIfIndexExist()
 {
     using (var table = new OracleTestTable(Connection, Quoter, null, Quoter.QuoteColumnName("id") + " int"))
     {
         table.WithIndexOn("id");
         Processor.IndexExists(null, table.Name, "UI_ID").ShouldBeFalse();
     }
 }
 public void CallingConstraintExistsReturnsFalseIfConstraintDoesNotExistWithSchema()
 {
     using (var table = new OracleTestTable(Connection, Quoter, SchemaName, Quoter.QuoteColumnName("id") + " int"))
     {
         table.WithUniqueConstraintOn("id");
         Processor.ConstraintExists(SchemaName, table.Name, "DoesNotExist").ShouldBeFalse();
     }
 }
 public void CallingColumnExistsWithIncorrectCaseReturnsTrueIfColumnExists()
 {
     //the ColumnExisits() function is'nt case sensitive
     using (var table = new OracleTestTable(Processor, null, "id int"))
     {
         Processor.ColumnExists(null, table.Name, "Id").ShouldBeTrue();
     }
 }
 public void CallingConstraintExistsWithIncorrectCaseReturnsFalseIfConstraintExists()
 {
     using (var table = new OracleTestTable(Connection, null, Quoter.QuoteColumnName("id") + " int"))
     {
         table.WithUniqueConstraintOn("id");
         Processor.ConstraintExists(null, table.Name, "UC_ID").ShouldBeFalse();
     }
 }
 public override void CallingConstraintExistsReturnsTrueIfConstraintExists()
 {
     using (var table = new OracleTestTable(this.Connection, null, this.Factory, "id int"))
     {
         table.WithUniqueConstraintOn("ID");
         this.Processor.ConstraintExists(null, table.Name, "UC_id").ShouldBeTrue();
     }
 }
 public override void CallingConstraintExistsCanAcceptTableNameWithSingleQuote()
 {
     using (var table = new OracleTestTable("Test'Table", this.Connection, null, this.Factory, "id int"))
     {
         table.WithUniqueConstraintOn("ID");
         this.Processor.ConstraintExists(null, table.Name, "UC_id").ShouldBeTrue();
     }
 }
示例#16
0
 public override void CallingIndexExistsReturnsFalseIfIndexDoesNotExistWithSchema()
 {
     using (var table = new OracleTestTable(Processor, SchemaName, "id int"))
     {
         table.WithIndexOn("ID");
         Processor.IndexExists(SchemaName, table.Name, "DoesNotExist").ShouldBeFalse();
     }
 }
示例#17
0
 public override void CallingConstraintExistsCanAcceptConstraintNameWithSingleQuote()
 {
     using (var table = new OracleTestTable(Connection, null, Quoter.QuoteColumnName("id") + " int"))
     {
         table.WithUniqueConstraintOn("id", "UC'id");
         Processor.ConstraintExists(null, table.Name, "UC'id").ShouldBeTrue();
     }
 }
示例#18
0
 public override void CallingIndexExistsReturnsFalseIfIndexDoesNotExist()
 {
     using (var table = new OracleTestTable(this.Connection, null, this.Factory, "id int"))
     {
         table.WithIndexOn("ID");
         this.Processor.IndexExists(null, table.Name, "DoesNotExist").ShouldBeFalse();
     }
 }
示例#19
0
 public override void CallingIndexExistsCanAcceptIndexNameWithSingleQuote()
 {
     using (var table = new OracleTestTable(this.Connection, null, this.Factory, "id int"))
     {
         table.WithIndexOn("ID", "UI'id");
         this.Processor.IndexExists(null, table.Name, "UI'id").ShouldBeTrue();
     }
 }
示例#20
0
 public override void CallingIndexExistsReturnsTrueIfIndexExistsWithSchema()
 {
     using (var table = new OracleTestTable(this.Connection, SchemaName, this.Factory, "id int"))
     {
         table.WithIndexOn("ID");
         this.Processor.IndexExists(SchemaName, table.Name, "UI_id").ShouldBeTrue();
     }
 }
示例#21
0
 public override void CallingIndexExistsReturnsTrueIfIndexExists()
 {
     using (var table = new OracleTestTable(Processor, null, "id int"))
     {
         table.WithIndexOn("ID");
         Processor.IndexExists(null, table.Name, "UI_id").ShouldBeTrue();
     }
 }
示例#22
0
 public override void CallingConstraintExistsReturnsTrueIfConstraintExistsWithSchema()
 {
     using (var table = new OracleTestTable(Processor, SchemaName, "id int"))
     {
         table.WithUniqueConstraintOn("ID");
         Processor.ConstraintExists(SchemaName, table.Name, "UC_id").ShouldBeTrue();
     }
 }
 public override void CallingConstraintExistsReturnsFalseIfConstraintDoesNotExistWithSchema()
 {
     using (var table = new OracleTestTable(this.Connection, SchemaName, this.Factory, "id int"))
     {
         table.WithUniqueConstraintOn("ID");
         this.Processor.ConstraintExists(SchemaName, table.Name, "DoesNotExist").ShouldBeFalse();
     }
 }
示例#24
0
 public override void CallingIndexExistsReturnsFalseIfIndexDoesNotExistWithSchema()
 {
     using (var table = new OracleTestTable(Connection, SchemaName, Quoter.QuoteColumnName("id") + " int"))
     {
         table.WithIndexOn("id");
         Processor.IndexExists(SchemaName, table.Name, "DoesNotExist").ShouldBeFalse();
     }
 }
示例#25
0
 public override void CallingConstraintExistsCanAcceptConstraintNameWithSingleQuote()
 {
     using (var table = new OracleTestTable(Processor, null, "id int"))
     {
         table.WithUniqueConstraintOn("ID", "UC'id");
         Processor.ConstraintExists(null, table.Name, "UC'id").ShouldBeTrue();
     }
 }
 public void CallingConstraintExistsReturnsFalseIfConstraintExistsInDifferentSchema()
 {
     using (var table = new OracleTestTable(Connection, SchemaName, Quoter.QuoteColumnName("id") + " int"))
     {
         table.WithUniqueConstraintOn("id");
         Processor.ConstraintExists("testschema", table.Name, "UC_id").ShouldBeFalse();
     }
 }
示例#27
0
 public override void CallingIndexExistsCanAcceptTableNameWithSingleQuote()
 {
     using (var table = new OracleTestTable("Test'Table", Connection, null, Quoter.QuoteColumnName("id") + " int"))
     {
         table.WithIndexOn("id");
         Processor.IndexExists(null, table.Name, "UI_id").ShouldBeTrue();
     }
 }
示例#28
0
 public override void CallingConstraintExistsReturnsFalseIfConstraintDoesNotExist()
 {
     using (var table = new OracleTestTable(Processor, null, "id int"))
     {
         table.WithUniqueConstraintOn("ID");
         Processor.ConstraintExists(null, table.Name, "DoesNotExist").ShouldBeFalse();
     }
 }
示例#29
0
 public override void CallingIndexExistsReturnsTrueIfIndexExists()
 {
     using (var table = new OracleTestTable(Connection, null, Quoter.QuoteColumnName("id") + " int"))
     {
         table.WithIndexOn("id");
         Processor.IndexExists(null, table.Name, "UI_id").ShouldBeTrue();
     }
 }
 public void CallingConstraintExistsReturnsTrueIfConstraintExist()
 {
     using (var table = new OracleTestTable(Connection, Quoter, null, Quoter.QuoteColumnName("id") + " int"))
     {
         table.WithUniqueConstraintOn("id");
         Processor.ConstraintExists(null, table.Name, "UC_id").ShouldBeTrue();
     }
 }