use of org.structr.web.entity.html.Link in project structr by structr.
the class DeploymentTest method test04ContentTypes.
@Test
public void test04ContentTypes() {
// setup
try (final Tx tx = app.tx()) {
final Page page = Page.createNewPage(securityContext, "test04");
final Html html = createElement(page, page, "html");
final Head head = createElement(page, html, "head");
createElement(page, head, "title", "test04");
createElement(page, head, "link");
createElement(page, head, "link");
createComment(page, head, "commentöäüÖÄÜß+#");
final Link link3 = createElement(page, head, "link");
final PropertyMap link3Properties = new PropertyMap();
link3Properties.put(StructrApp.key(Link.class, "_html_href"), "/");
link3Properties.put(StructrApp.key(Link.class, "_html_media"), "screen");
link3Properties.put(StructrApp.key(Link.class, "_html_type"), "stylesheet");
link3.setProperties(link3.getSecurityContext(), link3Properties);
final Body body = createElement(page, html, "body");
final Div div1 = createElement(page, body, "div");
createElement(page, div1, "h1", "private");
tx.success();
} catch (FrameworkException fex) {
fail("Unexpected exception.");
}
// test
compare(calculateHash(), true);
}
Aggregations