io.github.bekoenig.assertj.schemacrawler.api.AbstractTableConstraintColumnAssert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of assertj-schemacrawler Show documentation
Show all versions of assertj-schemacrawler Show documentation
An assertj extension for schema-crawler.
package io.github.bekoenig.assertj.schemacrawler.api;
import schemacrawler.schema.TableConstraint;
import schemacrawler.schema.TableConstraintColumn;
import java.util.function.Consumer;
import java.util.function.Predicate;
public abstract class AbstractTableConstraintColumnAssert<
SELF extends AbstractTableConstraintColumnAssert,
ACTUAL extends TableConstraintColumn>
extends AbstractKeyColumnAssert {
protected AbstractTableConstraintColumnAssert(ACTUAL actual, Class> selfType) {
super(actual, selfType);
}
public SELF satisfiesTableConstraint(Consumer requirement) {
extracting(TableConstraintColumn::getTableConstraint).satisfies(requirement);
return myself;
}
public SELF matchesTableConstraintOrdinalPosition(Predicate predicate) {
extracting(TableConstraintColumn::getTableConstraintOrdinalPosition).matches(predicate);
return myself;
}
}