protected void beforeRequest() {
setParameter("cid", conversationId);
}
protected void invokeApplication() throws Exception {
UploadHome uploadHome = (UploadHome)getInstance(UploadHome.class);
assert uploadHome.getInstance().getId().equals(30l); // Init!
assert uploadHome.getInstance().getTags().size() == 0;
uploadHome.getTagEditor().setNewTag("New Tag");
uploadHome.getTagEditor().addNewTag();
assert invokeMethod("#{uploadHome.update}").equals("updated");
}
protected void renderResponse() throws Exception {
UploadHome uploadHome = (UploadHome)getInstance(UploadHome.class);
assert uploadHome.getInstance().getTags().size() == 1;
assert uploadHome.getInstance().getTagsAsList().get(0).equals("New Tag");
TagQuery tagQuery = (TagQuery)getInstance(TagQuery.class);
tagQuery.setTag("New Tag");
List<WikiFile> taggedFiles = tagQuery.getTaggedFiles();
assert taggedFiles.size() == 1;