assertNotNull(link);
}
public void testPortal() throws Exception
{
Site portal = session.getWorkspace().getSite(ObjectType.PORTAL_SITE, "test");
assertNotNull(portal);
//
assertTrue(portal.isAdapted(ProtectedResource.class));
ProtectedResource pr = portal.adapt(ProtectedResource.class);
assertEquals(Arrays.asList("test_access_permissions"), pr.getAccessPermissions());
assertEquals("test_edit_permission", pr.getEditPermission());
//
assertEquals("test", portal.getName());
Attributes attrs = portal.getAttributes();
assertEquals("en", attrs.getString("locale"));
assertEquals("test_skin", attrs.getString("skin"));
assertEquals("test_prop_value", attrs.getString("prop_key"));
//
Page layout = portal.getRootNavigation().getTemplatized().getTemplate();
assertNotNull(layout);
assertSame(portal.getRootPage().getChild("templates").getChild("default"), layout);
}