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();
     }
 }
 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 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 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();
     }
 }
Exemple #5
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();
     }
 }
Exemple #6
0
 public override void CallingConstraintExistsReturnsFalseIfConstraintDoesNotExist()
 {
     using (var table = new OracleTestTable(Processor, null, "id int"))
     {
         table.WithUniqueConstraintOn("ID");
         Processor.ConstraintExists(null, table.Name, "DoesNotExist").ShouldBeFalse();
     }
 }
 public void CallingConstraintExistsWithIncorrectCaseReturnsFalseIfConstraintExists()
 {
     using (var table = new OracleTestTable(Connection, Quoter, null, Quoter.QuoteColumnName("id") + " int"))
     {
         table.WithUniqueConstraintOn("id");
         Processor.ConstraintExists(null, table.Name, "UC_ID").ShouldBeFalse();
     }
 }
Exemple #8
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();
     }
 }
Exemple #9
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();
     }
 }
Exemple #10
0
 public override void CallingConstraintExistsReturnsTrueIfConstraintExists()
 {
     using (var table = new OracleTestTable(Connection, null, Quoter.QuoteColumnName("id") + " int"))
     {
         table.WithUniqueConstraintOn("id");
         Processor.ConstraintExists(null, table.Name, "UC_id").ShouldBeTrue();
     }
 }
Exemple #11
0
 public override void CallingConstraintExistsCanAcceptTableNameWithSingleQuote()
 {
     using (var table = new OracleTestTable("Test'Table", Connection, null, Quoter.QuoteColumnName("id") + " int"))
     {
         table.WithUniqueConstraintOn("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();
     }
 }
Exemple #13
0
 public void CallingConstraintExistsWithIncorrectCaseReturnsTrueIfConstraintExists()
 {
     //the ConstraintExists() function is'nt case sensitive
     using (var table = new OracleTestTable(Processor, null, "id int"))
     {
         table.WithUniqueConstraintOn("ID", "uc_id");
         this.Processor.ConstraintExists(null, table.Name, "Uc_Id").ShouldBeTrue();
     }
 }