use of io.wring.model.Events in project wring by yegor256.
the class DyEventsITCase method appendsToExistingEvents.
/**
* DyEvents can append text to.
* @throws Exception If some problem inside
*/
@Test
public void appendsToExistingEvents() throws Exception {
final User user = new DyUser(new Dynamo(), "peter");
final Events events = user.events();
final String title = "a simple title";
events.post(title, "\n\tfirst body");
events.post(title, "\n\u0000\u00fdin between");
events.post(title, "second body\n\n");
MatcherAssert.assertThat(new Xembler(events.iterate().iterator().next().asXembly()).xml(), XhtmlMatchers.hasXPaths("/event/text[contains(.,'first')]", "/event/text[contains(.,'second body')]", "/event/text[not(contains(.,'first body\n'))]"));
}
Aggregations