use of org.apache.axiom.testutils.io.ExceptionOutputStream in project webservices-axiom by apache.
the class TestWriteToWithError method runTest.
@Override
protected void runTest(WritableBlob blob) throws Throwable {
blob.readFrom(new NullInputStream(size));
ExceptionOutputStream out = new ExceptionOutputStream(size / 2);
try {
blob.writeTo(out);
fail("Expected StreamCopyException");
} catch (StreamCopyException ex) {
assertThat(ex.getOperation()).isEqualTo(StreamCopyException.WRITE);
assertThat(ex.getCause()).isSameAs(out.getException());
}
}
Aggregations