public void CallingTableExistsReturnsFalseIfTableExistsInDifferentSchema() { using (var table = new Db2ISeriesTestTable(Processor, "TstSchma", "ID INT")) { Processor.TableExists("DNE", table.Name).ShouldBeFalse(); } }
public override void CallingIndexExistsReturnsFalseIfIndexDoesNotExistWithSchema() { using (var table = new Db2ISeriesTestTable(Processor, "TstSchma", "ID INT")) { Processor.IndexExists("TstSchma", table.Name, "DoesNotExist").ShouldBeFalse(); } }
public override void CallingTableExistsReturnsTrueIfTableExists() { using (var table = new Db2ISeriesTestTable(Processor, null, "ID INT")) { Processor.TableExists(null, table.Name).ShouldBeTrue(); } }
public override void CallingTableExistsReturnsTrueIfTableExistsWithSchema() { using (var table = new Db2ISeriesTestTable(Processor, "TstSchma", "ID INT")) { Processor.TableExists("TstSchma", table.Name).ShouldBeTrue(); } }
public override void CallingTableExistsCanAcceptTableNameWithSingleQuote() { using (var table = new Db2ISeriesTestTable("Test'Table", Processor, null, "ID INT")) { Processor.TableExists(null, table.Name).ShouldBeTrue(); } }
public override void CallingColumnExistsReturnsFalseIfColumnDoesNotExist() { using (var table = new Db2ISeriesTestTable(Processor, null, "ID INT")) { Processor.ColumnExists(null, table.Name, "DoesNotExist").ShouldBeFalse(); } }
public void CallingConstraintExistsReturnsFalseIfConstraintExistsInDifferentSchema() { using (var table = new Db2ISeriesTestTable(Processor, "TstSchma", "ID INT NOT NULL")) { table.WithUniqueConstraintOn("ID", "c1"); Processor.ConstraintExists("DNE", table.Name, "c1").ShouldBeFalse(); } }
public override void CallingIndexExistsCanAcceptTableNameWithSingleQuote() { using (var table = new Db2ISeriesTestTable("Test'Table", Processor, null, "ID INT")) { table.WithIndexOn("ID", "UI_id"); Processor.IndexExists(null, table.Name, "UI_id").ShouldBeTrue(); } }
public override void CallingIndexExistsReturnsTrueIfIndexExistsWithSchema() { using (var table = new Db2ISeriesTestTable(Processor, "TstSchma", "ID INT")) { table.WithIndexOn("ID", "UI_id"); Processor.IndexExists("TstSchma", table.Name, "UI_id").ShouldBeTrue(); } }
public override void CallingConstraintExistsCanAcceptTableNameWithSingleQuote() { using (var table = new Db2ISeriesTestTable("Test'Table", Processor, null, "ID INT NOT NULL")) { table.WithUniqueConstraintOn("ID", "C'1"); Processor.ConstraintExists(null, table.Name, "C'1").ShouldBeTrue(); } }
public override void CallingConstraintExistsReturnsTrueIfConstraintExistsWithSchema() { using (var table = new Db2ISeriesTestTable(Processor, "TstSchma", "ID INT NOT NULL")) { table.WithUniqueConstraintOn("ID", "C1"); Processor.ConstraintExists("TstSchma", table.Name, "C1").ShouldBeTrue(); } }
public override void CallingColumnExistsCanAcceptColumnNameWithSingleQuote() { var columnName = Quoter.Quote("I'D") + " INT"; using (var table = new Db2ISeriesTestTable(Processor, null, columnName)) { Processor.ColumnExists(null, table.Name, "I'D").ShouldBeTrue(); } }