Package org.assertj.core.internal
Class InputStreams
java.lang.Object
org.assertj.core.internal.InputStreams
Reusable assertions for
InputStreams.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) BinaryDiff(package private) Diff(package private) Failuresprivate static final InputStreams -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassertHasBinaryContent(AssertionInfo info, InputStream actual, byte[] expected) Asserts that the given InputStream has the given binary content.voidassertHasContent(AssertionInfo info, InputStream actual, String expected) Asserts that the given InputStream has the same content as the given String.voidassertHasDigest(AssertionInfo info, InputStream actual, String algorithm, byte[] expected) voidassertHasDigest(AssertionInfo info, InputStream actual, String algorithm, String expected) voidassertHasDigest(AssertionInfo info, InputStream actual, MessageDigest digest, byte[] expected) voidassertHasDigest(AssertionInfo info, InputStream actual, MessageDigest digest, String expected) voidassertIsEmpty(AssertionInfo info, InputStream actual) Asserts that the given InputStreams is empty.voidassertIsNotEmpty(AssertionInfo info, InputStream actual) Asserts that the given InputStreams is not empty.private static voidassertNotNull(AssertionInfo info, InputStream stream) voidassertSameContentAs(AssertionInfo info, InputStream actual, InputStream expected) Asserts that the given InputStreams have same content.static InputStreamsinstance()Returns the singleton instance of this class.
-
Field Details
-
INSTANCE
-
diff
Diff diff -
binaryDiff
BinaryDiff binaryDiff -
failures
Failures failures
-
-
Constructor Details
-
InputStreams
InputStreams()
-
-
Method Details
-
instance
Returns the singleton instance of this class.- Returns:
- the singleton instance of this class.
-
assertSameContentAs
Asserts that the given InputStreams have same content.- Parameters:
info- contains information about the assertion.actual- the "actual" InputStream.expected- the "expected" InputStream.- Throws:
NullPointerException- ifexpectedisnull.AssertionError- ifactualisnull.AssertionError- if the given InputStreams do not have same content.InputStreamsException- if an I/O error occurs.
-
assertIsEmpty
Asserts that the given InputStreams is empty.- Parameters:
info- contains information about the assertion.actual- the "actual" InputStream.- Throws:
AssertionError- ifactualis not empty.InputStreamsException- if an I/O error occurs.
-
assertIsNotEmpty
Asserts that the given InputStreams is not empty.- Parameters:
info- contains information about the assertion.actual- the "actual" InputStream.- Throws:
AssertionError- ifactualis not empty.InputStreamsException- if an I/O error occurs.
-
assertHasContent
Asserts that the given InputStream has the same content as the given String.- Parameters:
info- contains information about the assertion.actual- the actual InputStream.expected- the expected String.- Throws:
NullPointerException- ifexpectedisnull.AssertionError- ifactualisnull.AssertionError- if the given InputStream does not have the same content as the given String.InputStreamsException- if an I/O error occurs.
-
assertHasBinaryContent
Asserts that the given InputStream has the given binary content.- Parameters:
info- contains information about the assertion.actual- the actual InputStream.expected- the expected binary content.- Throws:
NullPointerException- ifexpectedisnull.AssertionError- ifactualisnull.AssertionError- if the given InputStream does not have the same content as the given String.InputStreamsException- if an I/O error occurs.
-
assertNotNull
-
assertHasDigest
public void assertHasDigest(AssertionInfo info, InputStream actual, MessageDigest digest, byte[] expected) -
assertHasDigest
public void assertHasDigest(AssertionInfo info, InputStream actual, MessageDigest digest, String expected) -
assertHasDigest
public void assertHasDigest(AssertionInfo info, InputStream actual, String algorithm, byte[] expected) -
assertHasDigest
public void assertHasDigest(AssertionInfo info, InputStream actual, String algorithm, String expected)
-