diff options
author | Vitaly Takmazov | 2018-12-13 10:49:16 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-12-13 10:49:16 +0300 |
commit | 445e6bbc61da68149ccd12e05cf781cffcf05aee (patch) | |
tree | b627490b8e389ffe9d008cf348d015420c282028 /src/test/java/com/juick/MessageTest.java | |
parent | 9d493ac966db2e016f73efcdcfb65dfb10bf8114 (diff) |
do not count linebreak as part of entity
Diffstat (limited to 'src/test/java/com/juick/MessageTest.java')
-rw-r--r-- | src/test/java/com/juick/MessageTest.java | 4 |
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)); } } |