Package dev.enola.common.io.testlib
Class ResourceSubject
java.lang.Object
com.google.common.truth.Subject
dev.enola.common.io.testlib.ResourceSubject
Google Truth custom
Subject for Resource.
Resource content is canonicalized (AKA normalized), based on mediaType
, before comparisons.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.truth.Subject
com.google.common.truth.Subject.Factory<SubjectT extends com.google.common.truth.Subject,ActualT> -
Constructor Summary
ConstructorsConstructorDescriptionResourceSubject(com.google.common.truth.FailureMetadata metadata, @Nullable ReadableResource actual) -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceSubjectassertThat(@Nullable ReadableResource actual) voidcontainsCharsOf(@Nullable ReadableResource expected) voidcontainsCharsOfIgnoreEOL(@Nullable ReadableResource expected) voidhasCharsEqualTo(@Nullable ReadableResource expected) voidhasCharsEqualToOrDiff(@Nullable ReadableResource expected) voidhasJSONEqualTo(@Nullable ReadableResource expected) Deprecated.Normally, this should be able to be replaced with hasCharsEqualTo now?Methods inherited from class com.google.common.truth.Subject
actualCustomStringRepresentation, check, equals, failWithActual, failWithActual, failWithoutActual, hashCode, ignoreCheck, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameInstanceAs, isNull, isSameInstanceAs, toString
-
Constructor Details
-
ResourceSubject
public ResourceSubject(com.google.common.truth.FailureMetadata metadata, @Nullable ReadableResource actual)
-
-
Method Details
-
assertThat
-
hasCharsEqualTo
- Throws:
IOException
-
hasCharsEqualToOrDiff
- Throws:
IOException
-
containsCharsOf
- Throws:
IOException
-
containsCharsOfIgnoreEOL
- Throws:
IOException
-
hasJSONEqualTo
Deprecated.Normally, this should be able to be replaced with hasCharsEqualTo now?- Throws:
IOException
-