use of org.llorllale.cactoos.matchers.EndsWith in project cactoos by yegor256.
the class TextOfTest method readsStringBuilder.
@Test
void readsStringBuilder() {
final String starts = "Name it, ";
final String ends = "then it exists!";
new Assertion<>("Can't process a string builder", new TextOf(new StringBuilder(starts).append(ends)), new AllOf<>(new StartsWith(starts), new EndsWith(ends))).affirm();
}
use of org.llorllale.cactoos.matchers.EndsWith in project cactoos by yegor256.
the class InputOfTest method readsStringBuilder.
@Test
void readsStringBuilder() throws Exception {
final String starts = "Name it, ";
final String ends = "then it exists!";
new Assertion<>("must receive a string builder", new TextOf(new BytesOf(new InputOf(new StringBuilder(starts).append(ends)))), new AllOf<>(new StartsWith(starts), new EndsWith(ends))).affirm();
}
use of org.llorllale.cactoos.matchers.EndsWith in project cactoos by yegor256.
the class InputOfTest method readsStringBuffer.
@Test
void readsStringBuffer() throws Exception {
final String starts = "The future ";
final String ends = "is now!";
new Assertion<>("must receive a string buffer", new TextOf(new BytesOf(new InputOf(new StringBuffer(starts).append(ends)))), new AllOf<>(new StartsWith(starts), new EndsWith(ends))).affirm();
}
use of org.llorllale.cactoos.matchers.EndsWith in project cactoos by yegor256.
the class TextOfTest method readsStringBuffer.
@Test
void readsStringBuffer() {
final String starts = "In our daily life, ";
final String ends = "we can smile!";
new Assertion<>("Can't process a string builder hahahaha", new TextOf(new StringBuffer(starts).append(ends)), new AllOf<>(new StartsWith(starts), new EndsWith(ends))).affirm();
}
Aggregations