Search in sources :

Example 1 with IteratorOfBytes

use of org.cactoos.iterator.IteratorOfBytes in project cactoos by yegor256.

the class BytesOfTest method asBytesFromIterator.

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

Aggregations

Text (org.cactoos.Text)1 IteratorOfBytes (org.cactoos.iterator.IteratorOfBytes)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