public IterableAssert<Relation> asTermVariationsHavingRule(String ruleName) { Set<Relation> variations = Sets.newHashSet(); for(Relation v:actual.getRelations()) { if(getVariationRules(v).contains(ruleName)) variations.add(v); } return assertThat(variations); }
public IterableAssert<Relation> asTermVariations(RelationType ralType, RelationType... ralTypes) { EnumSet<RelationType> accepted = EnumSet.of(ralType, ralTypes); Set<Relation> relations = actual.getRelations().stream() .filter(r-> accepted.contains(r.getType())) .collect(toSet()); return assertThat( relations); }
public IterableAssert<Term> asCompoundList() { Set<Term> comouponds = actual.getTerms().values().stream() .filter(t-> t.getWords().size() == 1 && t.getWords().get(0).getWord().isCompound()) .collect(toSet()); IterableAssert<Term> assertThat = assertThat(comouponds); return assertThat; }
public IterableAssert<String> asMatchingRules() { Set<String> matchingRuleNames = Sets.newHashSet(); for(Relation tv:actual.getRelations().stream().filter(r->r.getType() == RelationType.VARIATION).collect(toSet())) matchingRuleNames.addAll(getVariationRules(tv)); IterableAssert<String> assertThat = assertThat(matchingRuleNames); return assertThat; }
public static <$Element> IterableAssert<$Element> resultOf(CheckedIterableSupplier<$Element> whenStep) { return assertThat(result(whenStep)); }
public static <$Element> IterableAssert<$Element> resultOf(CheckedIteratorSupplier<$Element> whenStep) { return assertThat(result(whenStep)); }
public IterableAssert<Object> asValuesAssert() { return assertThat(actual.getValues()); }
public IterableAssert<Object> asValuesAssert() { return assertThat(actual.getStringArrayMatcherAspect().getValues()); }
public IterableAssert<Relation> getVariations(Term base) { return assertThat(UnitTests.outRels(actual, base)); }
/** * Delegate call to public static <ELEMENT> org.assertj.core.api.IterableAssert<ELEMENT> org.assertj.core.api.Assertions.assertThat(java.lang.Iterable<? extends ELEMENT>) * {@link org.assertj.core.api.Assertions#assertThat(java.lang.Iterable)} */ default <ELEMENT> IterableAssert<ELEMENT> assertThat(Iterable<? extends ELEMENT> actual) { return Assertions.assertThat(actual); }
/** * Delegate call to public static <ELEMENT> org.assertj.core.api.IterableAssert<ELEMENT> org.assertj.core.api.Assertions.assertThat(java.util.Iterator<? extends ELEMENT>) * {@link org.assertj.core.api.Assertions#assertThat(java.util.Iterator)} */ default <ELEMENT> IterableAssert<ELEMENT> assertThat(Iterator<? extends ELEMENT> actual) { return Assertions.assertThat(actual); }