- assertNotNull("Parts", parts);
- assertEquals("Part Text", "Some text. Empty link: http:// – nice!", convertText(parts, PlainTextPart.class));
+ assertThat("Parts", parts, notNullValue());
+ assertThat("Part Text", "Some text. Empty link: http:// – nice!", is(convertText(parts, PlainTextPart.class)));
+ }
+
+ @Test
+ public void httpLinkWithoutParensEndsAtNextClosingParen() {
+ SoneTextParser soneTextParser = new SoneTextParser(null, null);
+ Iterable<Part> parts = soneTextParser.parse("Some text (and a link: http://example.sone/abc) – nice!", null);
+ assertThat("Parts", parts, notNullValue());
+ assertThat("Part Text", "Some text (and a link: [http://example.sone/abc|example.sone/abc|example.sone/abc]) – nice!", is(convertText(parts, PlainTextPart.class, LinkPart.class)));