private void TestCreateTableWithVarcharColumn(IDbContext dbContext) { Initialize(dbContext); TableDefinition tableDefinition = TestTableCreator.CreateTableSomeColumnsAndOneRow(dbContext, _testTable); _dbSchema.IsTable(tableDefinition.Name).Should().BeTrue(); }
private void TestGetTableNames_When_Wildcard(IDbContext dbContext, string searchString, string shouldFind1, string shouldFind2) { Initialize(dbContext); const string table1 = "htest0table"; const string table2 = "htestsometable"; try { TestTableCreator.CreateTableSomeColumnsAndOneRow(dbContext, table1); TestTableCreator.CreateTableSomeColumnsAndOneRow(dbContext, table2); TestTableCreator.CreateTableSomeColumnsAndOneRow(dbContext, shouldFind1); TestTableCreator.CreateTableSomeColumnsAndOneRow(dbContext, shouldFind2); List <ITableShortInfo> actual = _dbSchema.GetTableNames(searchString); CompareToAcrparordAcrrepord(actual, shouldFind1, shouldFind2); } finally { _dbSchema.DropTable(table1); _dbSchema.DropTable(table2); _dbSchema.DropTable(shouldFind1); _dbSchema.DropTable(shouldFind2); } }
private void TestIsTable_When_TableExists(IDbContext dbContext) { Initialize(dbContext); TestTableCreator.CreateTableSomeColumnsAndOneRow(dbContext, _testTable); _dbSchema.IsTable(_testTable).Should().BeTrue($"because {_testTable} should exist"); }
private void TestExecuteNonQuery(IDbContext dbContext) { Initialize(dbContext); TestTableCreator.CreateTableSomeColumnsAndOneRow(dbContext, _testTable); _commands.ExecuteNonQuery($"update {_testTable} set val = 'AH'").Should().Be(1); }
public void Test_MS_IsView() { Initialize(_msContext); TestTableCreator.CreateTableSomeColumnsAndOneRow(_msContext, _testTable); Test_IsView(); }
private void TestGetTableNames_When_SingleTable(IDbContext dbContext) { Initialize(dbContext); TestTableCreator.CreateTableSomeColumnsAndOneRow(dbContext, _testTable); _dbSchema.GetTableNames(_testTable)[0].Name.Should().BeEquivalentTo(_testTable); }