public class ByteSourceAssert extends org.assertj.core.api.AbstractAssert<ByteSourceAssert,com.google.common.io.ByteSource>
ByteSource.| Modifier | Constructor and Description |
|---|---|
protected |
ByteSourceAssert(com.google.common.io.ByteSource actual) |
| Modifier and Type | Method and Description |
|---|---|
ByteSourceAssert |
hasSameContentAs(com.google.common.io.ByteSource other)
Verifies that the actual
ByteSource contains has the same content as the provided one. |
ByteSourceAssert |
hasSize(long expectedSize)
Verifies that the size of the actual
ByteSource is equal to the given one. |
void |
isEmpty()
Verifies that the actual
ByteSource is empty. |
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, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, overridingErrorMessage, usingComparator, usingDefaultComparator, withThreadDumpOnErrorprotected ByteSourceAssert(com.google.common.io.ByteSource actual)
public ByteSourceAssert hasSameContentAs(com.google.common.io.ByteSource other) throws IOException
ByteSource contains has the same content as the provided one.Example :
ByteSource actual = ByteSource.wrap(new byte[1]);
ByteSource other = ByteSource.wrap(new byte[1]);
assertThat(actual).hasSameContentAs(other);other - ByteSource to compare against.ByteSourceAssert for assertions chaining.IOException - if ByteSource.contentEquals(com.google.common.io.ByteSource) throws one.AssertionError - if the actual ByteSource is null.AssertionError - if the actual ByteSource does not contain the same content.public void isEmpty()
throws IOException
ByteSource is empty.
Example :
ByteSource actual = ByteSource.wrap(new byte[0]);
assertThat(actual).isEmpty();IOException - if ByteSource.isEmpty() throws one.AssertionError - if the actual ByteSource is null.AssertionError - if the actual ByteSource is not empty.public ByteSourceAssert hasSize(long expectedSize) throws IOException
ByteSource is equal to the given one.
Example :
ByteSource actual = ByteSource.wrap(new byte[9]);
assertThat(actual).hasSize(9);expectedSize - the expected size of actual ByteSource.ByteSourceAssert for assertions chaining.IOException - if ByteSource.size() throws one.AssertionError - if the actual ByteSource is null.AssertionError - if the number of values of the actual ByteSource is not equal to the given one.Copyright © 2015 AssertJ. All rights reserved.