protected void beforeRequest() {
setParameter("directoryId", "2");
}
protected void renderResponse() throws Exception {
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 1;
assert clipboard.getItemsAsList().get(0).equals(30l);
assert !clipboard.isCut(30l);
}
}.run();
new FacesRequest("/dirDisplay_d.xhtml") {
protected void beforeRequest() {
setParameter("directoryId", "4");
}
protected void renderResponse() throws Exception {
DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
assert browser.getInstance().getId().equals(4l); // Init!
browser.paste();
browser.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
}
}.run();
new FacesRequest("/dirDisplay_d.xhtml") {
protected void beforeRequest() {
setParameter("directoryId", "4");
}
protected void renderResponse() throws Exception {
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
assert browser.getInstance().getId().equals(4l); // Init!
assert browser.getChildNodes().size() == 2;