Package org.assertj.core.api
Class AbstractInputStreamAssert<SELF extends AbstractInputStreamAssert<SELF,ACTUAL>,ACTUAL extends InputStream>
java.lang.Object
org.assertj.core.api.AbstractAssert<SELF,ACTUAL>
org.assertj.core.api.AbstractInputStreamAssert<SELF,ACTUAL>
- Type Parameters:
SELF
- the "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation" for more details.ACTUAL
- the type of the "actual" value.
- All Implemented Interfaces:
Assert<SELF,
,ACTUAL> Descriptable<SELF>
,ExtensionPoints<SELF,
ACTUAL>
- Direct Known Subclasses:
InputStreamAssert
public abstract class AbstractInputStreamAssert<SELF extends AbstractInputStreamAssert<SELF,ACTUAL>,ACTUAL extends InputStream>
extends AbstractAssert<SELF,ACTUAL>
Base class for all implementations of assertions for
InputStream
s.-
Field Summary
FieldsFields inherited from class org.assertj.core.api.AbstractAssert
actual, conditions, info, myself, objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhasContentEqualTo
(InputStream expected) Deprecated.hasSameContentAs
(InputStream expected) Verifies that the content of the actualInputStream
is equal to the content of the given one.Methods inherited from class org.assertj.core.api.AbstractAssert
as, as, asList, asString, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasToString, inBinary, inHexadecimal, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, overridingErrorMessage, satisfies, setCustomRepresentation, throwAssertionError, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnError
-
Field Details
-
inputStreams
InputStreams inputStreams
-
-
Constructor Details
-
AbstractInputStreamAssert
-
-
Method Details
-
hasContentEqualTo
Deprecated.usehasSameContentAs(InputStream)
insteadVerifies that the content of the actualInputStream
is equal to the content of the given one.- Parameters:
expected
- the givenInputStream
to compare the actualInputStream
to.- Returns:
this
assertion object.- Throws:
NullPointerException
- if the givenInputStream
isnull
.AssertionError
- if the actualInputStream
isnull
.AssertionError
- if the content of the actualInputStream
is not equal to the content of the given one.InputStreamsException
- if an I/O error occurs.
-
hasSameContentAs
Verifies that the content of the actualInputStream
is equal to the content of the given one.Example:
// assertion will pass assertThat(new ByteArrayInputStream(new byte[] {0xa})).hasSameContentAs(new ByteArrayInputStream(new byte[] {0xa})); // assertions will fail assertThat(new ByteArrayInputStream(new byte[] {0xa})).hasSameContentAs(new ByteArrayInputStream(new byte[] {})); assertThat(new ByteArrayInputStream(new byte[] {0xa})).hasSameContentAs(new ByteArrayInputStream(new byte[] {0xa, 0xc, 0xd}));
- Parameters:
expected
- the givenInputStream
to compare the actualInputStream
to.- Returns:
this
assertion object.- Throws:
NullPointerException
- if the givenInputStream
isnull
.AssertionError
- if the actualInputStream
isnull
.AssertionError
- if the content of the actualInputStream
is not equal to the content of the given one.InputStreamsException
- if an I/O error occurs.
-
hasSameContentAs(InputStream)
instead