Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package io.github.bekoenig.assertj.schemacrawler.api;
import org.assertj.core.api.*;
import schemacrawler.schema.*;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import static org.assertj.core.api.Assertions.assertThat;
public class AbstractCatalogAssert>
extends AbstractComparableAssert {
protected AbstractCatalogAssert(Catalog actual, Class> selfType) {
super(actual, selfType);
}
private Schema getSchema(String schemaName) {
Optional schema = actual.lookupSchema(schemaName);
assertThat(schema).as("Undefined schema name '%s'", schemaName).isPresent();
return schema.get();
}
public ListableNamedObjectAssert, List, ColumnDataType, ColumnDataTypeAssert> columnDataTypes() {
isNotNull();
return new ListableNamedObjectAssert<>(
actual.getColumnDataTypes(),
SchemaCrawlerAssertions::assertThat);
}
public ListableNamedObjectAssert, List, ColumnDataType, ColumnDataTypeAssert> columnDataTypes(String schemaName) {
isNotNull();
return new ListableNamedObjectAssert<>(
actual.getColumnDataTypes(getSchema(schemaName)),
SchemaCrawlerAssertions::assertThat);
}
public ObjectAssert crawlInfo() {
return extracting(Catalog::getCrawlInfo)
.asInstanceOf(InstanceOfAssertFactories.type(CrawlInfo.class));
}
public ObjectAssert databaseInfo() {
return extracting(Catalog::getDatabaseInfo)
.asInstanceOf(InstanceOfAssertFactories.type(CrawlInfo.class));
}
public AbstractCollectionAssert, Collection extends DatabaseUser>, DatabaseUser, ObjectAssert> databaseUsers() {
return extracting(Catalog::getDatabaseUsers)
.asInstanceOf(InstanceOfAssertFactories.collection(DatabaseUser.class));
}
public ObjectAssert jdbcDriverInfo() {
return extracting(Catalog::getJdbcDriverInfo)
.asInstanceOf(InstanceOfAssertFactories.type(CrawlInfo.class));
}
public ListableNamedObjectAssert, List, Routine, RoutineAssert> routines() {
isNotNull();
return new ListableNamedObjectAssert<>(
actual.getRoutines(),
SchemaCrawlerAssertions::assertThat);
}
public ListableNamedObjectAssert, List, Routine, RoutineAssert> routines(String schemaName) {
isNotNull();
return new ListableNamedObjectAssert<>(
actual.getRoutines(getSchema(schemaName)),
SchemaCrawlerAssertions::assertThat);
}
public ListableNamedObjectAssert, List, Schema, SchemaAssert> schemas() {
isNotNull();
return new ListableNamedObjectAssert<>(
actual.getSchemas(),
SchemaCrawlerAssertions::assertThat);
}
public ListableNamedObjectAssert, List, Sequence, SequenceAssert> sequences() {
isNotNull();
return new ListableNamedObjectAssert<>(
actual.getSequences(),
SchemaCrawlerAssertions::assertThat);
}
public ListableNamedObjectAssert, List, Sequence, SequenceAssert> sequences(String schemaName) {
isNotNull();
return new ListableNamedObjectAssert<>(
actual.getSequences(getSchema(schemaName)),
SchemaCrawlerAssertions::assertThat);
}
public ListableNamedObjectAssert, List, Synonym, SynonymAssert> synonyms() {
isNotNull();
return new ListableNamedObjectAssert<>(
actual.getSynonyms(),
SchemaCrawlerAssertions::assertThat);
}
public ListableNamedObjectAssert, List, Synonym, SynonymAssert> synonyms(String schemaName) {
isNotNull();
return new ListableNamedObjectAssert<>(
actual.getSynonyms(getSchema(schemaName)),
SchemaCrawlerAssertions::assertThat);
}
public ListableNamedObjectAssert, List, ColumnDataType, ColumnDataTypeAssert> systemColumnDataTypes() {
isNotNull();
return new ListableNamedObjectAssert<>(
actual.getSystemColumnDataTypes(),
SchemaCrawlerAssertions::assertThat);
}
public ListableNamedObjectAssert, List
, Table, TableAssert> tables() {
isNotNull();
return new ListableNamedObjectAssert<>(
actual.getTables(),
SchemaCrawlerAssertions::assertThat);
}
public ListableNamedObjectAssert, List