TableMetaData implements TableMetaDataView { @Override public String getQuotedTablePath() { return quotedTablePath; } TableMetaData(String catalogName, String schemaName, String tableName,
      List<String> keyColumnNames, String quoteString,
      Map<String, ColumnMetaData> columnMetaDataMap); @Override String getQuotedTablePath(); @Override List<String> getKeyColumnNames(); @Override JDBCType getColumnDataType(String columnName); @Override boolean isColumnNullable(String columnName); @Override Set<String> getColumnNames(); @Override String getIdentifierQuoteString();  }
@Test public void verifyTableWithQuoteAndNoCatalogOrSchema() { quoteString = "+"; tableName = "myTable"; createTableMetaData(); assertThat(tableMetaData.getQuotedTablePath()).isEqualTo(quoteString + tableName + quoteString); }
@Test public void verifyTableWithQuoteAndEmptyCatalogAndSchema() { quoteString = "+"; tableName = "myTable"; catalogName = ""; schemaName = ""; createTableMetaData(); assertThat(tableMetaData.getQuotedTablePath()).isEqualTo(quoteString + tableName + quoteString); }
@Test public void verifyTableWithQuoteAndSchemaAndNoCatalog() { quoteString = "+"; tableName = "myTable"; schemaName = "mySchema"; createTableMetaData(); assertThat(tableMetaData.getQuotedTablePath()).isEqualTo( quoteString + schemaName + quoteString + "." + quoteString + tableName + quoteString); }
@Test public void verifyTableWithQuoteAndCatalogAndNoSchema() { quoteString = "+"; tableName = "myTable"; catalogName = "myCatalog"; createTableMetaData(); assertThat(tableMetaData.getQuotedTablePath()).isEqualTo( quoteString + catalogName + quoteString + "." + quoteString + tableName + quoteString); }
@Test public void verifyTableWithQuoteAndSchemaCatalog() { quoteString = "+"; tableName = "myTable"; schemaName = "mySchema"; catalogName = "myCatalog"; createTableMetaData(); assertThat(tableMetaData.getQuotedTablePath()) .isEqualTo(quoteString + catalogName + quoteString + "." + quoteString + schemaName + quoteString + "." + quoteString + tableName + quoteString); }
@Test public void verifyTableWithSchemaCatalogAndNoQuote() { tableName = "myTable"; schemaName = "mySchema"; catalogName = "myCatalog"; createTableMetaData(); assertThat(tableMetaData.getQuotedTablePath()) .isEqualTo(catalogName + "." + schemaName + "." + tableName); }