Package org.assertj.core.api
Class AbstractInputStreamAssert<SELF extends AbstractInputStreamAssert<SELF,ACTUAL>,ACTUAL extends java.io.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 java.io.InputStream> extends AbstractAssert<SELF,ACTUAL>
Base class for all implementations of assertions forInputStreams.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) InputStreamsinputStreams-
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, conditions, info, myself, objects
-
-
Constructor Summary
Constructors Constructor Description AbstractInputStreamAssert(ACTUAL actual, java.lang.Class<?> selfType)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SELFhasContentEqualTo(java.io.InputStream expected)Deprecated.usehasSameContentAs(InputStream)insteadSELFhasSameContentAs(java.io.InputStream expected)Verifies that the content of the actualInputStreamis 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 Detail
-
inputStreams
InputStreams inputStreams
-
-
Constructor Detail
-
AbstractInputStreamAssert
public AbstractInputStreamAssert(ACTUAL actual, java.lang.Class<?> selfType)
-
-
Method Detail
-
hasContentEqualTo
@Deprecated public SELF hasContentEqualTo(java.io.InputStream expected)
Deprecated.usehasSameContentAs(InputStream)insteadVerifies that the content of the actualInputStreamis equal to the content of the given one.- Parameters:
expected- the givenInputStreamto compare the actualInputStreamto.- Returns:
thisassertion object.- Throws:
java.lang.NullPointerException- if the givenInputStreamisnull.java.lang.AssertionError- if the actualInputStreamisnull.java.lang.AssertionError- if the content of the actualInputStreamis not equal to the content of the given one.InputStreamsException- if an I/O error occurs.
-
hasSameContentAs
public SELF hasSameContentAs(java.io.InputStream expected)
Verifies that the content of the actualInputStreamis 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 givenInputStreamto compare the actualInputStreamto.- Returns:
thisassertion object.- Throws:
java.lang.NullPointerException- if the givenInputStreamisnull.java.lang.AssertionError- if the actualInputStreamisnull.java.lang.AssertionError- if the content of the actualInputStreamis not equal to the content of the given one.InputStreamsException- if an I/O error occurs.
-
-