public class InputStreams
extends java.lang.Object
InputStream
s.Modifier and Type | Field and Description |
---|---|
(package private) Diff |
diff |
(package private) Failures |
failures |
private static InputStreams |
INSTANCE |
Constructor and Description |
---|
InputStreams() |
Modifier and Type | Method and Description |
---|---|
void |
assertHasContent(AssertionInfo info,
java.io.InputStream actual,
java.lang.String expected)
Asserts that the given InputStream has the same content as the given String.
|
void |
assertHasDigest(AssertionInfo info,
java.io.InputStream actual,
java.security.MessageDigest digest,
byte[] expected) |
void |
assertHasDigest(AssertionInfo info,
java.io.InputStream actual,
java.security.MessageDigest digest,
java.lang.String expected) |
void |
assertHasDigest(AssertionInfo info,
java.io.InputStream actual,
java.lang.String algorithm,
byte[] expected) |
void |
assertHasDigest(AssertionInfo info,
java.io.InputStream actual,
java.lang.String algorithm,
java.lang.String expected) |
private static void |
assertNotNull(AssertionInfo info,
java.io.InputStream stream) |
void |
assertSameContentAs(AssertionInfo info,
java.io.InputStream actual,
java.io.InputStream expected)
Asserts that the given InputStreams have same content.
|
static InputStreams |
instance()
Returns the singleton instance of this class.
|
private static final InputStreams INSTANCE
Diff diff
Failures failures
public static InputStreams instance()
public void assertSameContentAs(AssertionInfo info, java.io.InputStream actual, java.io.InputStream expected)
info
- contains information about the assertion.actual
- the "actual" InputStream.expected
- the "expected" InputStream.java.lang.NullPointerException
- if expected
is null
.java.lang.AssertionError
- if actual
is null
.java.lang.AssertionError
- if the given InputStreams do not have same content.InputStreamsException
- if an I/O error occurs.public void assertHasContent(AssertionInfo info, java.io.InputStream actual, java.lang.String expected)
info
- contains information about the assertion.actual
- the actual InputStream.expected
- the expected String.java.lang.NullPointerException
- if expected
is null
.java.lang.AssertionError
- if actual
is null
.java.lang.AssertionError
- if the given InputStream does not have the same content as the given String.InputStreamsException
- if an I/O error occurs.private static void assertNotNull(AssertionInfo info, java.io.InputStream stream)
public void assertHasDigest(AssertionInfo info, java.io.InputStream actual, java.security.MessageDigest digest, byte[] expected)
public void assertHasDigest(AssertionInfo info, java.io.InputStream actual, java.security.MessageDigest digest, java.lang.String expected)
public void assertHasDigest(AssertionInfo info, java.io.InputStream actual, java.lang.String algorithm, byte[] expected)
public void assertHasDigest(AssertionInfo info, java.io.InputStream actual, java.lang.String algorithm, java.lang.String expected)