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 org.assertj.core.api.AbstractIterableAssert
iterables
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals
-
Constructor Summary
ConstructorDescriptionTraceDiagnosticListAssert
(@Nullable List<? extends TraceDiagnostic<? extends JavaFileObject>> traceDiagnostics) Initialize this assertion. -
Method Summary
Modifier and TypeMethodDescriptionGet aTraceDiagnosticListAssert
across all diagnostics that have theDiagnostic.Kind.WARNING
kind.errors()
Get aTraceDiagnosticListAssert
across all diagnostics that have theDiagnostic.Kind.ERROR
kind.excludingKinds
(Iterable<Diagnostic.Kind> kinds) Get aTraceDiagnosticListAssert
that contains diagnostics corresponding to none of the givenkinds
.excludingKinds
(Diagnostic.Kind... kinds) Get aTraceDiagnosticListAssert
that 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 aTraceDiagnosticListAssert
that contains diagnostics corresponding to any of the givenkinds
.filteringByKinds
(Diagnostic.Kind... kinds) Get aTraceDiagnosticListAssert
that contains diagnostics corresponding to any of the givenkinds
.Assert that this list has noDiagnostic.Kind.WARNING
diagnostics.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.ERROR
diagnostics.Assert that this list has noDiagnostic.Kind.ERROR
,Diagnostic.Kind.WARNING
, orDiagnostic.Kind.MANDATORY_WARNING
diagnostics.Assert that this list has noDiagnostic.Kind.MANDATORY_WARNING
diagnostics.Assert that this list has noDiagnostic.Kind.NOTE
diagnostics.Assert that this list has noDiagnostic.Kind.OTHER
diagnostics.Assert that this list has noDiagnostic.Kind.WARNING
orDiagnostic.Kind.MANDATORY_WARNING
diagnostics.Get aTraceDiagnosticListAssert
across all diagnostics that have theDiagnostic.Kind.MANDATORY_WARNING
kind.protected TraceDiagnosticListAssert
newAbstractIterableAssert
(Iterable<? extends TraceDiagnostic<? extends JavaFileObject>> iterable) notes()
Get aTraceDiagnosticListAssert
across all diagnostics that have theDiagnostic.Kind.NOTE
kind.others()
Get aTraceDiagnosticListAssert
across all diagnostics that have theDiagnostic.Kind.OTHER
kind.protected TraceDiagnosticAssert
toAssert
(TraceDiagnostic<? extends JavaFileObject> value, String description) warnings()
Get aTraceDiagnosticListAssert
across all diagnostics that have theDiagnostic.Kind.WARNING
orDiagnostic.Kind.MANDATORY_WARNING
kind.Methods inherited from class org.assertj.core.api.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, withThreadDumpOnError
Methods inherited from class org.assertj.core.api.AbstractCollectionAssert
isUnmodifiable
Methods inherited from class org.assertj.core.api.AbstractIterableAssert
allMatch, allMatch, allSatisfy, allSatisfy, 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, 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, zipSatisfy
Methods inherited from class org.assertj.core.api.AbstractAssert
areEqual, asInstanceOf, asList, assertionError, asString, descriptionText, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, 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, withFailMessage, withRepresentation
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, describedAs
Methods inherited from interface org.assertj.core.api.EnumerableAssert
hasSameSizeAs, hasSameSizeAs, hasSize, hasSizeBetween, hasSizeGreaterThan, hasSizeGreaterThanOrEqualTo, hasSizeLessThan, hasSizeLessThanOrEqualTo, isEmpty, isNotEmpty, isNullOrEmpty
Methods inherited from interface org.assertj.core.api.ObjectEnumerableAssert
allMatch, allMatch, allSatisfy, allSatisfy, 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, 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 aTraceDiagnosticListAssert
across all diagnostics that have theDiagnostic.Kind.ERROR
kind.- Returns:
- the assertion object for
Diagnostic.Kind.ERROR
diagnostics. - Throws:
AssertionError
- if the list is null.
-
warnings
Get aTraceDiagnosticListAssert
across all diagnostics that have theDiagnostic.Kind.WARNING
orDiagnostic.Kind.MANDATORY_WARNING
kind.- Returns:
- the assertion object for
Diagnostic.Kind.WARNING
andDiagnostic.Kind.MANDATORY_WARNING
diagnostics. - Throws:
AssertionError
- if the list is null.
-
customWarnings
Get aTraceDiagnosticListAssert
across all diagnostics that have theDiagnostic.Kind.WARNING
kind.- Returns:
- the assertion object for
Diagnostic.Kind.WARNING
diagnostics. - Throws:
AssertionError
- if the list is null.
-
mandatoryWarnings
Get aTraceDiagnosticListAssert
across all diagnostics that have theDiagnostic.Kind.MANDATORY_WARNING
kind.- Returns:
- the assertion object for
Diagnostic.Kind.MANDATORY_WARNING
diagnostics. - Throws:
AssertionError
- if the list is null.
-
notes
Get aTraceDiagnosticListAssert
across all diagnostics that have theDiagnostic.Kind.NOTE
kind.- Returns:
- the assertion object for
Diagnostic.Kind.NOTE
diagnostics. - Throws:
AssertionError
- if the list is null.
-
others
Get aTraceDiagnosticListAssert
across all diagnostics that have theDiagnostic.Kind.OTHER
kind.- Returns:
- the assertion object for
Diagnostic.Kind.OTHER
diagnostics. - Throws:
AssertionError
- if the list is null.
-
filteringByKinds
Get aTraceDiagnosticListAssert
that 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 aTraceDiagnosticListAssert
that 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 aTraceDiagnosticListAssert
that 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 aTraceDiagnosticListAssert
that 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.ERROR
diagnostics.- 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_WARNING
diagnostics.- Returns:
- this assertion object for further call chaining.
- Throws:
AssertionError
- if this list is null.
-
hasNoWarnings
Assert that this list has noDiagnostic.Kind.WARNING
orDiagnostic.Kind.MANDATORY_WARNING
diagnostics.- Returns:
- this assertion object for further call chaining.
- Throws:
AssertionError
- if this list is null.
-
hasNoCustomWarnings
Assert that this list has noDiagnostic.Kind.WARNING
diagnostics.- Returns:
- this assertion object for further call chaining.
- Throws:
AssertionError
- if this list is null.
-
hasNoMandatoryWarnings
Assert that this list has noDiagnostic.Kind.MANDATORY_WARNING
diagnostics.- Returns:
- this assertion object for further call chaining.
- Throws:
AssertionError
- if this list is null.
-
hasNoNotes
Assert that this list has noDiagnostic.Kind.NOTE
diagnostics.- Returns:
- this assertion object for further call chaining.
- Throws:
AssertionError
- if this list is null.
-
hasNoOtherDiagnostics
Assert that this list has noDiagnostic.Kind.OTHER
diagnostics.- 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:
toAssert
in classAbstractIterableAssert<TraceDiagnosticListAssert,
List<? extends TraceDiagnostic<? extends JavaFileObject>>, TraceDiagnostic<? extends JavaFileObject>, TraceDiagnosticAssert>
-
newAbstractIterableAssert
protected TraceDiagnosticListAssert newAbstractIterableAssert(Iterable<? extends TraceDiagnostic<? extends JavaFileObject>> iterable) - Specified by:
newAbstractIterableAssert
in classAbstractIterableAssert<TraceDiagnosticListAssert,
List<? extends TraceDiagnostic<? extends JavaFileObject>>, TraceDiagnostic<? extends JavaFileObject>, TraceDiagnosticAssert>
-