io.github.bekoenig.assertj.schemacrawler.api.AbstractDependantObjectAssert Maven / Gradle / Ivy
package io.github.bekoenig.assertj.schemacrawler.api;
import org.assertj.core.api.AbstractObjectAssert;
import schemacrawler.schema.DatabaseObject;
import schemacrawler.schema.DependantObject;
import java.util.function.Predicate;
public abstract class AbstractDependantObjectAssert<
SELF extends AbstractDependantObjectAssert,
ACTUAL extends DependantObject,
PARENT extends DatabaseObject>
extends AbstractDatabaseObjectAssert {
protected AbstractDependantObjectAssert(ACTUAL actual, Class> selfType) {
super(actual, selfType);
}
public SELF matchesShortName(Predicate predicate) {
extracting(DependantObject::getShortName).matches(predicate);
return myself;
}
public SELF isParentPartial(boolean expected) {
returns(expected, DependantObject::isParentPartial);
return myself;
}
public AbstractObjectAssert, PARENT> parent() {
return extracting(DependantObject::getParent);
}
}