Class TraceDiagnosticListAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<TraceDiagnosticListAssert, List<? extends TraceDiagnostic<? extends JavaFileObject>>>
org.assertj.core.api.AbstractIterableAssert<TraceDiagnosticListAssert, List<? extends TraceDiagnostic<? extends JavaFileObject>>, TraceDiagnostic<? extends JavaFileObject>, TraceDiagnosticAssert>
org.assertj.core.api.AbstractCollectionAssert<TraceDiagnosticListAssert, List<? extends TraceDiagnostic<? extends JavaFileObject>>, TraceDiagnostic<? extends JavaFileObject>, TraceDiagnosticAssert>
org.assertj.core.api.AbstractListAssert<TraceDiagnosticListAssert, List<? extends TraceDiagnostic<? extends JavaFileObject>>, TraceDiagnostic<? extends JavaFileObject>, TraceDiagnosticAssert>
io.github.ascopes.jct.assertions.TraceDiagnosticListAssert
- All Implemented Interfaces:
Assert<TraceDiagnosticListAssert, List<? extends TraceDiagnostic<? extends JavaFileObject>>>, Descriptable<TraceDiagnosticListAssert>, EnumerableAssert<TraceDiagnosticListAssert, TraceDiagnostic<? extends JavaFileObject>>, ExtensionPoints<TraceDiagnosticListAssert, List<? extends TraceDiagnostic<? extends JavaFileObject>>>, IndexedObjectEnumerableAssert<TraceDiagnosticListAssert, TraceDiagnostic<? extends JavaFileObject>>, ObjectEnumerableAssert<TraceDiagnosticListAssert, TraceDiagnostic<? extends JavaFileObject>>
public final class TraceDiagnosticListAssert
extends AbstractListAssert<TraceDiagnosticListAssert, List<? extends TraceDiagnostic<? extends JavaFileObject>>, TraceDiagnostic<? extends JavaFileObject>, TraceDiagnosticAssert>
Assertions for a list of diagnostics.
- Since:
- 0.0.1
- Author:
- Ashley Scopes
-
Field Summary
Fields inherited from class AbstractIterableAssert
iterablesFields inherited from class AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Constructor Summary
ConstructorsConstructorDescriptionTraceDiagnosticListAssert(@Nullable List<? extends TraceDiagnostic<? extends JavaFileObject>> traceDiagnostics) Initialize this assertion. -
Method Summary
Modifier and TypeMethodDescriptionGet aTraceDiagnosticListAssertacross all diagnostics that have theDiagnostic.Kind.WARNINGkind.errors()Get aTraceDiagnosticListAssertacross all diagnostics that have theDiagnostic.Kind.ERRORkind.excludingKinds(Iterable<Diagnostic.Kind> kinds) Get aTraceDiagnosticListAssertthat contains diagnostics corresponding to none of the givenkinds.excludingKinds(Diagnostic.Kind... kinds) Get aTraceDiagnosticListAssertthat contains diagnostics corresponding to none of the givenkinds.filteringBy(Predicate<TraceDiagnostic<? extends JavaFileObject>> predicate) Filter diagnostics by a given predicate and return an assertion object that applies to all diagnostics that match that predicate.filteringByKinds(Iterable<Diagnostic.Kind> kinds) Get aTraceDiagnosticListAssertthat contains diagnostics corresponding to any of the givenkinds.filteringByKinds(Diagnostic.Kind... kinds) Get aTraceDiagnosticListAssertthat contains diagnostics corresponding to any of the givenkinds.Assert that this list has noDiagnostic.Kind.WARNINGdiagnostics.Assert that this list has no diagnostics matching any of the given kinds.hasNoDiagnosticsOfKinds(Diagnostic.Kind... kinds) Assert that this list has no diagnostics matching any of the given kinds.Assert that this list has noDiagnostic.Kind.ERRORdiagnostics.Assert that this list has noDiagnostic.Kind.ERROR,Diagnostic.Kind.WARNING, orDiagnostic.Kind.MANDATORY_WARNINGdiagnostics.Assert that this list has noDiagnostic.Kind.MANDATORY_WARNINGdiagnostics.Assert that this list has noDiagnostic.Kind.NOTEdiagnostics.Assert that this list has noDiagnostic.Kind.OTHERdiagnostics.Assert that this list has noDiagnostic.Kind.WARNINGorDiagnostic.Kind.MANDATORY_WARNINGdiagnostics.Get aTraceDiagnosticListAssertacross all diagnostics that have theDiagnostic.Kind.MANDATORY_WARNINGkind.protected TraceDiagnosticListAssertnewAbstractIterableAssert(Iterable<? extends TraceDiagnostic<? extends JavaFileObject>> iterable) notes()Get aTraceDiagnosticListAssertacross all diagnostics that have theDiagnostic.Kind.NOTEkind.others()Get aTraceDiagnosticListAssertacross all diagnostics that have theDiagnostic.Kind.OTHERkind.protected TraceDiagnosticAsserttoAssert(TraceDiagnostic<? extends JavaFileObject> value, String description) warnings()Get aTraceDiagnosticListAssertacross all diagnostics that have theDiagnostic.Kind.WARNINGorDiagnostic.Kind.MANDATORY_WARNINGkind.Methods inherited from class AbstractListAssert
as, as, contains, describedAs, describedAs, doesNotContain, doesNotHave, doesNotHaveSameClassAs, has, has, hasSameClassAs, hasToString, is, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isOfAnyClassIn, isSameAs, isSorted, isSortedAccordingTo, overridingErrorMessage, satisfies, usingComparator, usingComparator, usingComparisonStrategy, usingDefaultComparator, usingDefaultElementComparator, usingElementComparator, withFailMessage, withThreadDumpOnErrorMethods inherited from class AbstractCollectionAssert
isUnmodifiableMethods inherited from class AbstractIterableAssert
allMatch, allMatch, allSatisfy, allSatisfy, anyMatch, anyMatch, anySatisfy, anySatisfy, are, areAtLeast, areAtLeastOne, areAtMost, areExactly, areNot, contains, containsAll, containsAnyElementsOf, containsAnyOf, containsAnyOfForProxy, containsExactly, containsExactlyElementsOf, containsExactlyForProxy, containsExactlyInAnyOrder, containsExactlyInAnyOrderElementsOf, containsExactlyInAnyOrderForProxy, containsForProxy, containsNull, containsOnly, containsOnlyElementsOf, containsOnlyForProxy, containsOnlyNulls, containsOnlyOnce, containsOnlyOnceElementsOf, containsOnlyOnceForProxy, containsSequence, containsSequence, containsSequenceForProxy, containsSubsequence, containsSubsequence, containsSubsequenceForProxy, doesNotContain, doesNotContainAnyElementsOf, doesNotContainForProxy, doesNotContainNull, doesNotContainSequence, doesNotContainSequence, doesNotContainSequenceForProxy, doesNotContainSubsequence, doesNotContainSubsequence, doesNotContainSubsequenceForProxy, doesNotHaveAnyElementsOfTypes, doesNotHaveDuplicates, doNotHave, element, element, elements, endsWith, endsWith, endsWithForProxy, extracting, extracting, extracting, extracting, extracting, extracting, extractingForProxy, extractingResultOf, extractingResultOf, filteredOn, filteredOn, filteredOn, filteredOn, filteredOn, filteredOnAssertions, filteredOnAssertions, filteredOnNull, first, first, flatExtracting, flatExtracting, flatExtracting, flatExtracting, flatExtracting, flatExtracting, flatExtractingForProxy, flatMap, flatMap, flatMap, flatMap, getComparatorsByType, getComparatorsForElementPropertyOrFieldTypes, hasAtLeastOneElementOfType, hasExactlyElementsOfTypes, hasOnlyElementsOfType, hasOnlyElementsOfTypes, hasOnlyOneElementSatisfying, hasSameElementsAs, hasSameSizeAs, hasSameSizeAs, hasSize, hasSizeBetween, hasSizeGreaterThan, hasSizeGreaterThanOrEqualTo, hasSizeLessThan, hasSizeLessThanOrEqualTo, have, haveAtLeast, haveAtLeastOne, haveAtMost, haveExactly, inBinary, inHexadecimal, isEmpty, isNotEmpty, isNullOrEmpty, isSubsetOf, isSubsetOf, isSubsetOfForProxy, last, last, map, map, map, navigationDescription, newAbstractIterableAssertForProxy, noneMatch, noneMatch, noneSatisfy, noneSatisfy, satisfiesExactly, satisfiesExactly, satisfiesExactlyForProxy, satisfiesExactlyInAnyOrder, satisfiesExactlyInAnyOrder, satisfiesExactlyInAnyOrderForProxy, satisfiesOnlyOnce, satisfiesOnlyOnce, satisfiesOnlyOnceForProxy, singleElement, singleElement, size, startsWith, startsWithForProxy, usingComparatorForElementFieldsWithNames, usingComparatorForElementFieldsWithType, usingComparatorForType, usingElementComparatorIgnoringFields, usingElementComparatorOnFields, usingFieldByFieldElementComparator, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, usingRecursiveFieldByFieldElementComparator, usingRecursiveFieldByFieldElementComparator, usingRecursiveFieldByFieldElementComparatorIgnoringFields, usingRecursiveFieldByFieldElementComparatorOnFields, zipSatisfyMethods inherited from class AbstractAssert
actual, areEqual, asInstanceOf, asList, assertionError, asString, descriptionText, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, hashCode, hasSameHashCodeAs, hasToString, isElementOfCustomAssert, isInstanceOfSatisfying, isNull, matches, matches, newListAssertInstance, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingEquals, usingEquals, withFailMessage, withRepresentationMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Descriptable
as, describedAsMethods inherited from interface EnumerableAssert
hasSameSizeAs, hasSameSizeAs, hasSize, hasSizeBetween, hasSizeGreaterThan, hasSizeGreaterThanOrEqualTo, hasSizeLessThan, hasSizeLessThanOrEqualTo, isEmpty, isNotEmpty, isNullOrEmptyMethods inherited from interface ObjectEnumerableAssert
allMatch, allMatch, allSatisfy, allSatisfy, anyMatch, anyMatch, anySatisfy, anySatisfy, are, areAtLeast, areAtLeastOne, areAtMost, areExactly, areNot, contains, containsAll, containsAnyElementsOf, containsAnyOf, containsExactly, containsExactlyElementsOf, containsExactlyInAnyOrder, containsExactlyInAnyOrderElementsOf, containsNull, containsOnly, containsOnlyElementsOf, containsOnlyNulls, containsOnlyOnce, containsOnlyOnceElementsOf, containsSequence, containsSequence, containsSubsequence, containsSubsequence, doesNotContain, doesNotContainAnyElementsOf, doesNotContainNull, doesNotContainSequence, doesNotContainSequence, doesNotContainSubsequence, doesNotContainSubsequence, doesNotHaveAnyElementsOfTypes, doesNotHaveDuplicates, doNotHave, endsWith, endsWith, hasAtLeastOneElementOfType, hasExactlyElementsOfTypes, hasOnlyElementsOfType, hasOnlyElementsOfTypes, hasOnlyOneElementSatisfying, hasSameElementsAs, have, haveAtLeast, haveAtLeastOne, haveAtMost, haveExactly, isSubsetOf, isSubsetOf, noneMatch, noneMatch, noneSatisfy, noneSatisfy, satisfiesExactly, satisfiesExactly, satisfiesExactlyInAnyOrder, satisfiesExactlyInAnyOrder, satisfiesOnlyOnce, satisfiesOnlyOnce, startsWith
-
Constructor Details
-
TraceDiagnosticListAssert
public TraceDiagnosticListAssert(@Nullable List<? extends TraceDiagnostic<? extends JavaFileObject>> traceDiagnostics) Initialize this assertion.- Parameters:
traceDiagnostics- the diagnostics to perform assertions on.
-
-
Method Details
-
errors
Get aTraceDiagnosticListAssertacross all diagnostics that have theDiagnostic.Kind.ERRORkind.- Returns:
- the assertion object for
Diagnostic.Kind.ERRORdiagnostics. - Throws:
AssertionError- if the list is null.
-
warnings
Get aTraceDiagnosticListAssertacross all diagnostics that have theDiagnostic.Kind.WARNINGorDiagnostic.Kind.MANDATORY_WARNINGkind.- Returns:
- the assertion object for
Diagnostic.Kind.WARNINGandDiagnostic.Kind.MANDATORY_WARNINGdiagnostics. - Throws:
AssertionError- if the list is null.
-
customWarnings
Get aTraceDiagnosticListAssertacross all diagnostics that have theDiagnostic.Kind.WARNINGkind.- Returns:
- the assertion object for
Diagnostic.Kind.WARNINGdiagnostics. - Throws:
AssertionError- if the list is null.
-
mandatoryWarnings
Get aTraceDiagnosticListAssertacross all diagnostics that have theDiagnostic.Kind.MANDATORY_WARNINGkind.- Returns:
- the assertion object for
Diagnostic.Kind.MANDATORY_WARNINGdiagnostics. - Throws:
AssertionError- if the list is null.
-
notes
Get aTraceDiagnosticListAssertacross all diagnostics that have theDiagnostic.Kind.NOTEkind.- Returns:
- the assertion object for
Diagnostic.Kind.NOTEdiagnostics. - Throws:
AssertionError- if the list is null.
-
others
Get aTraceDiagnosticListAssertacross all diagnostics that have theDiagnostic.Kind.OTHERkind.- Returns:
- the assertion object for
Diagnostic.Kind.OTHERdiagnostics. - Throws:
AssertionError- if the list is null.
-
filteringByKinds
Get aTraceDiagnosticListAssertthat contains diagnostics corresponding to any of the givenkinds.- Parameters:
kinds- the kinds to match.- Returns:
- the assertion object for the filtered diagnostics.
- Throws:
AssertionError- if this list is null.NullPointerException- if any of the kinds are null.IllegalArgumentException- if no kinds are provided.
-
filteringByKinds
Get aTraceDiagnosticListAssertthat contains diagnostics corresponding to any of the givenkinds.- Parameters:
kinds- the kinds to match.- Returns:
- the assertion object for the filtered diagnostics.
- Throws:
AssertionError- if this list is null.NullPointerException- if any of the kinds are null.
-
excludingKinds
Get aTraceDiagnosticListAssertthat contains diagnostics corresponding to none of the givenkinds.- Parameters:
kinds- kinds to ensure are not matched.- Returns:
- the assertion object for the filtered diagnostics.
- Throws:
AssertionError- if this list is null.NullPointerException- if any of the kinds are null.IllegalArgumentException- if no kinds are provided.
-
excludingKinds
Get aTraceDiagnosticListAssertthat contains diagnostics corresponding to none of the givenkinds.- Parameters:
kinds- the kinds to filter out.- Returns:
- the assertion object for the filtered diagnostics.
- Throws:
AssertionError- if this list is null.NullPointerException- if any of the kinds are null.
-
hasNoErrors
Assert that this list has noDiagnostic.Kind.ERRORdiagnostics.- Returns:
- this assertion object for further call chaining.
- Throws:
AssertionError- if this list is null.
-
hasNoErrorsOrWarnings
Assert that this list has noDiagnostic.Kind.ERROR,Diagnostic.Kind.WARNING, orDiagnostic.Kind.MANDATORY_WARNINGdiagnostics.- Returns:
- this assertion object for further call chaining.
- Throws:
AssertionError- if this list is null.
-
hasNoWarnings
Assert that this list has noDiagnostic.Kind.WARNINGorDiagnostic.Kind.MANDATORY_WARNINGdiagnostics.- Returns:
- this assertion object for further call chaining.
- Throws:
AssertionError- if this list is null.
-
hasNoCustomWarnings
Assert that this list has noDiagnostic.Kind.WARNINGdiagnostics.- Returns:
- this assertion object for further call chaining.
- Throws:
AssertionError- if this list is null.
-
hasNoMandatoryWarnings
Assert that this list has noDiagnostic.Kind.MANDATORY_WARNINGdiagnostics.- Returns:
- this assertion object for further call chaining.
- Throws:
AssertionError- if this list is null.
-
hasNoNotes
Assert that this list has noDiagnostic.Kind.NOTEdiagnostics.- Returns:
- this assertion object for further call chaining.
- Throws:
AssertionError- if this list is null.
-
hasNoOtherDiagnostics
Assert that this list has noDiagnostic.Kind.OTHERdiagnostics.- Returns:
- this assertion object for further call chaining.
- Throws:
AssertionError- if this list is null.
-
hasNoDiagnosticsOfKinds
Assert that this list has no diagnostics matching any of the given kinds.- Parameters:
kinds- kinds to check for.- Returns:
- this assertion object for further call chaining.
- Throws:
AssertionError- if the diagnostic list is null.NullPointerException- if the kind or more kinds are null.
-
hasNoDiagnosticsOfKinds
Assert that this list has no diagnostics matching any of the given kinds.- Parameters:
kinds- the kinds to check for.- Returns:
- this assertion object for further call chaining.
- Throws:
AssertionError- if the diagnostic list is null.NullPointerException- if any of the kinds are null.
-
filteringBy
public TraceDiagnosticListAssert filteringBy(Predicate<TraceDiagnostic<? extends JavaFileObject>> predicate) Filter diagnostics by a given predicate and return an assertion object that applies to all diagnostics that match that predicate.- Parameters:
predicate- the predicate to match.- Returns:
- the assertion object for the diagnostics that match.
- Throws:
NullPointerException- if the predicate is null.AssertionError- if the diagnostic list is null.
-
toAssert
protected TraceDiagnosticAssert toAssert(TraceDiagnostic<? extends JavaFileObject> value, String description) - Specified by:
toAssertin classAbstractIterableAssert<TraceDiagnosticListAssert, List<? extends TraceDiagnostic<? extends JavaFileObject>>, TraceDiagnostic<? extends JavaFileObject>, TraceDiagnosticAssert>
-
newAbstractIterableAssert
protected TraceDiagnosticListAssert newAbstractIterableAssert(Iterable<? extends TraceDiagnostic<? extends JavaFileObject>> iterable) - Specified by:
newAbstractIterableAssertin classAbstractIterableAssert<TraceDiagnosticListAssert, List<? extends TraceDiagnostic<? extends JavaFileObject>>, TraceDiagnostic<? extends JavaFileObject>, TraceDiagnosticAssert>
-