All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.bekoenig.assertj.schemacrawler.api.AbstractTableConstraintColumnAssert Maven / Gradle / Ivy

There is a newer version: 1.0.3
Show newest version
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;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy