@Test(expected = IllegalArgumentException.class) public void testThatRemoveTableMethodThrowsExceptionOnEmptyStringInput() { Catalog catalog = new Catalog("test-db"); catalog.removeTable(""); }
public Table removeTable(String tableName) { Table table = getTable(tableName); table.canBeDropped(); tables.remove(table); table.setParent(null); table.dropOutgoingForeignKeys(); return table; }
Catalog implements Copyable<Catalog> { public Table removeTable(String tableName) { Table table = getTable(tableName); table.canBeDropped(); tables.remove(table); table.setParent(null); table.dropOutgoingForeignKeys(); return table; } }
Catalog implements Copyable<Catalog> { public Table removeTable(String tableName) { Table table = getTable(tableName); table.canBeDropped(); tables.remove(table); table.setParent(null); table.dropOutgoingForeignKeys(); return table; } Catalog(String name); }
Catalog implements Copyable<Catalog> { public Table removeTable(String tableName) { Table table = getTable(tableName); table.canBeDropped(); tables.remove(table); table.setParent(null); table.dropOutgoingForeignKeys(); return table; } Catalog(String name); Catalog addTable(Table table); boolean containsTable(String tableName); Table getTable(String tableName); Table removeTable(String tableName); Catalog addView(View view); boolean containsView(String viewName); View getView(String viewName); View removeView(String viewName); Catalog addSequence(Sequence sequence); Sequence removeSequence(String sequenceName); ImmutableSet<Table> getTables(); ImmutableSet<View> getViews(); ImmutableSet<ForeignKey> getForeignKeys(); ImmutableSet<Index> getIndexes(); @Override Catalog copy(); @Override String toString(); Set<String> getTablesReferencingTable(String tableName); }
Catalog implements Copyable<Catalog> { public Table removeTable(String tableName) { Table table = getTable(tableName); table.canBeDropped(); tables.remove(table); table.setParent(null); table.dropOutgoingForeignKeys(); return table; } Catalog(String name); Catalog addTable(Table table); boolean containsTable(String tableName); Table getTable(String tableName); Table removeTable(String tableName); Catalog addView(View view); boolean containsView(String viewName); View getView(String viewName); View removeView(String viewName); Catalog addSequence(Sequence sequence); Sequence removeSequence(String sequenceName); ImmutableSet<Table> getTables(); ImmutableSet<View> getViews(); ImmutableSet<ForeignKey> getForeignKeys(); ImmutableSet<Index> getIndexes(); @Override Catalog copy(); @Override String toString(); Set<String> getTablesReferencingTable(String tableName);  }