Search in sources :

Example 1 with IterableOfBytes

use of org.cactoos.iterable.IterableOfBytes in project cactoos by yegor256.

the class BytesOfTest method asBytesFromIterable.

@Test
void asBytesFromIterable() throws Exception {
    final Text text = new TextOf("Good bye");
    new Assertion<>("Must convert iterable into bytes", new BytesOf(new IterableOfBytes(text)).asBytes(), new IsEqual<>(new BytesOf(text).asBytes())).affirm();
}
Also used : Text(org.cactoos.Text) IsText(org.llorllale.cactoos.matchers.IsText) TextOf(org.cactoos.text.TextOf) IterableOfBytes(org.cactoos.iterable.IterableOfBytes) IsEqual(org.hamcrest.core.IsEqual) Test(org.junit.jupiter.api.Test)

Aggregations

Text (org.cactoos.Text)1 IterableOfBytes (org.cactoos.iterable.IterableOfBytes)1 TextOf (org.cactoos.text.TextOf)1 IsEqual (org.hamcrest.core.IsEqual)1 Test (org.junit.jupiter.api.Test)1 IsText (org.llorllale.cactoos.matchers.IsText)1