use of org.jbehave.core.io.rest.Resource in project jbehave-core by jbehave.
the class UploadToXWikiBehaviour method canFormatAsJSONWithDefaultSyntax.
@Test
public void canFormatAsJSONWithDefaultSyntax() {
UploadToXWiki uploader = new UploadToXWiki(Type.JSON);
String resourcePath = "http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/some_story";
String content = read("xwiki.json");
Resource resource = new Resource(resourcePath);
resource.setContent(content);
String entity = uploader.entity(resource, Type.JSON);
assertThat(entity, containsString("\"title\":\"some_story\""));
assertThat(entity, containsString("\"syntax\":\"xwiki/2.0\""));
}
Aggregations