Class DependencySchemaAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<DependencySchemaAssert,edu.upc.fib.inlab.imp.kse.logics.dependencyschema.domain.DependencySchema>
edu.upc.fib.inlab.imp.kse.logics.dependencyschema.assertions.DependencySchemaAssert
- All Implemented Interfaces:
org.assertj.core.api.Assert<DependencySchemaAssert,
,edu.upc.fib.inlab.imp.kse.logics.dependencyschema.domain.DependencySchema> org.assertj.core.api.Descriptable<DependencySchemaAssert>
,org.assertj.core.api.ExtensionPoints<DependencySchemaAssert,
edu.upc.fib.inlab.imp.kse.logics.dependencyschema.domain.DependencySchema>
public class DependencySchemaAssert
extends org.assertj.core.api.AbstractAssert<DependencySchemaAssert,edu.upc.fib.inlab.imp.kse.logics.dependencyschema.domain.DependencySchema>
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals
-
Constructor Summary
ConstructorDescriptionDependencySchemaAssert
(edu.upc.fib.inlab.imp.kse.logics.dependencyschema.domain.DependencySchema dependencySchema) -
Method Summary
Modifier and TypeMethodDescriptionassertAllPredicatesAreEquivalent
(edu.upc.fib.inlab.imp.kse.logics.logicschema.domain.LogicSchema expectedSchema) Asserts whether the actual logicSchema predicates (base or derived) are equivalent to the expectedSchema.static DependencySchemaAssert
assertThat
(edu.upc.fib.inlab.imp.kse.logics.dependencyschema.domain.DependencySchema actual) containsEquivalentDerivationRule
(edu.upc.fib.inlab.imp.kse.logics.logicschema.domain.DerivationRule expectedRule) Checks whether the actual schema contains a derivation rule equivalent to expectedRule considering that two derived ordinary literals are equivalent iff their definition rules are equivalentcontainsEquivalentDerivationRule
(edu.upc.fib.inlab.imp.kse.logics.logicschema.domain.DerivationRule expectedRule, LogicSchemaAssert.DerivedLiteralStrategy derivedLiteralsStrategy) Checks whether the actual schema contains a derivation rule equivalent to expectedRule considering that two derived ordinary literals are equivalent according to the given strategy.containsEquivalentPredicate
(edu.upc.fib.inlab.imp.kse.logics.logicschema.domain.Predicate expectedPredicate) Checks whether the actual schema contains a predicate equivalent to expectedPredicate considering that two derived ordinary literals (appearing in the definition rules of the given predicate) are equivalent iff their definition rules are equivalentcontainsEquivalentPredicate
(edu.upc.fib.inlab.imp.kse.logics.logicschema.domain.Predicate expectedPredicate, LogicSchemaAssert.DerivedLiteralStrategy derivedLiteralsStrategy) Checks whether the actual schema contains a predicate equivalent to expectedPredicate considering that two derived ordinary literals (appearing in the definition rules of the given predicate) are equivalent according to the derivedLiteralStrategy givencontainsExactlyThesePredicateNames
(String... predicateNames) containsPredicate
(String predicateName, int arity) org.assertj.core.api.IterableAssert<edu.upc.fib.inlab.imp.kse.logics.dependencyschema.domain.Dependency>
hasDependencies
(int expectedDependencyCount) hasPredicates
(int expectedPredicatesCount) isEmpty()
Methods inherited from class org.assertj.core.api.AbstractAssert
areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs
-
Constructor Details
-
DependencySchemaAssert
public DependencySchemaAssert(edu.upc.fib.inlab.imp.kse.logics.dependencyschema.domain.DependencySchema dependencySchema)
-
-
Method Details
-
assertThat
public static DependencySchemaAssert assertThat(edu.upc.fib.inlab.imp.kse.logics.dependencyschema.domain.DependencySchema actual) -
containsPredicate
-
containsExactlyThesePredicateNames
-
dependencies
public org.assertj.core.api.IterableAssert<edu.upc.fib.inlab.imp.kse.logics.dependencyschema.domain.Dependency> dependencies() -
hasPredicates
-
hasDependencies
-
isEmpty
-
assertAllPredicatesAreEquivalent
public DependencySchemaAssert assertAllPredicatesAreEquivalent(edu.upc.fib.inlab.imp.kse.logics.logicschema.domain.LogicSchema expectedSchema) Asserts whether the actual logicSchema predicates (base or derived) are equivalent to the expectedSchema. Do note that this comparison is NOT agnostic with the name of the derived predicates.Since this check is not decidable, this method applies a sound (but not complete) strategy. In particular, for each derivation rule of one schema, it tries to find a homomorphic derivation rule of the other schema, and vice versa.
- Parameters:
expectedSchema
- not null- Returns:
- this assert
-
containsEquivalentDerivationRule
public DependencySchemaAssert containsEquivalentDerivationRule(edu.upc.fib.inlab.imp.kse.logics.logicschema.domain.DerivationRule expectedRule, LogicSchemaAssert.DerivedLiteralStrategy derivedLiteralsStrategy) Checks whether the actual schema contains a derivation rule equivalent to expectedRule considering that two derived ordinary literals are equivalent according to the given strategy.- Parameters:
expectedRule
- not nullderivedLiteralsStrategy
- not null- Returns:
- this assert
-
containsEquivalentDerivationRule
public DependencySchemaAssert containsEquivalentDerivationRule(edu.upc.fib.inlab.imp.kse.logics.logicschema.domain.DerivationRule expectedRule) Checks whether the actual schema contains a derivation rule equivalent to expectedRule considering that two derived ordinary literals are equivalent iff their definition rules are equivalent- Parameters:
expectedRule
- not null- Returns:
- this assert
-
containsEquivalentPredicate
public DependencySchemaAssert containsEquivalentPredicate(edu.upc.fib.inlab.imp.kse.logics.logicschema.domain.Predicate expectedPredicate, LogicSchemaAssert.DerivedLiteralStrategy derivedLiteralsStrategy) Checks whether the actual schema contains a predicate equivalent to expectedPredicate considering that two derived ordinary literals (appearing in the definition rules of the given predicate) are equivalent according to the derivedLiteralStrategy given- Parameters:
expectedPredicate
- not nullderivedLiteralsStrategy
- not null- Returns:
- this assert
-
containsEquivalentPredicate
public DependencySchemaAssert containsEquivalentPredicate(edu.upc.fib.inlab.imp.kse.logics.logicschema.domain.Predicate expectedPredicate) Checks whether the actual schema contains a predicate equivalent to expectedPredicate considering that two derived ordinary literals (appearing in the definition rules of the given predicate) are equivalent iff their definition rules are equivalent- Parameters:
expectedPredicate
- not null- Returns:
- this assert
-