aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-12-13 10:49:16 +0300
committerGravatar Vitaly Takmazov2018-12-13 10:49:16 +0300
commit445e6bbc61da68149ccd12e05cf781cffcf05aee (patch)
treeb627490b8e389ffe9d008cf348d015420c282028 /src/test
parent9d493ac966db2e016f73efcdcfb65dfb10bf8114 (diff)
do not count linebreak as part of entity
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/com/juick/MessageTest.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/java/com/juick/MessageTest.java b/src/test/java/com/juick/MessageTest.java
index 1d59a8db..4c37a678 100644
--- a/src/test/java/com/juick/MessageTest.java
+++ b/src/test/java/com/juick/MessageTest.java
@@ -191,5 +191,9 @@ public class MessageTest {
assertThat(entities.stream().filter(e -> e.getType().equals("q")).count(), is(1L));
assertThat(entities.stream().filter(e -> e.getType().equals("u")).count(), is(1L));
assertThat(entities.stream().filter(e -> e.getType().equals("a")).count(), is(4L));
+ Entity yo = entities.stream().filter(e -> e.getType().equals("q")).findFirst().orElseThrow(IllegalStateException::new);
+ assertThat(yo.getText(), is("how ?"));
+ assertThat(yo.getStart(), is(0));
+ assertThat(yo.getEnd(), is(7));
}
}