本文整理汇总了Java中javax.portlet.PortletMode.HELP属性的典型用法代码示例。如果您正苦于以下问题:Java PortletMode.HELP属性的具体用法?Java PortletMode.HELP怎么用?Java PortletMode.HELP使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.portlet.PortletMode
的用法示例。
在下文中一共展示了PortletMode.HELP属性的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: invoke1a
@Test
public void invoke1a() throws Exception {
meths.reset();
PortletInvoker i = new PortletInvoker(ams, "portlet1");
PortletMode mode = PortletMode.HELP;
req.setMode(mode);
i.renderHeaders(req, resp);
List<String> names = meths.getMethods();
assertNotNull(names);
assertEquals(3, names.size());
List<String> soll = Arrays.asList(new String[] {
Header1.class.getSimpleName() + "#header1a",
Header1.class.getSimpleName() + "#header1b",
Header1.class.getSimpleName() + "#header1c"
});
for (String name : names) {
assertTrue(soll.contains(name));
}
}
示例2: invoke2a
@Test
public void invoke2a() throws Exception {
meths.reset();
PortletInvoker i = new PortletInvoker(ams, "portlet2");
PortletMode mode = PortletMode.HELP;
req.setMode(mode);
i.renderHeaders(req, resp);
List<String> names = meths.getMethods();
assertNotNull(names);
assertEquals(1, names.size());
List<String> soll = Arrays.asList(new String[] {
Header1.class.getSimpleName() + "#header2a",
});
for (String name : names) {
assertTrue(soll.contains(name));
}
}
示例3: invoke2a
@Test
public void invoke2a() throws Exception {
meths.reset();
PortletInvoker i = new PortletInvoker(ams, "portlet2");
PortletMode mode = PortletMode.HELP;
req.setMode(mode);
i.render(req, resp);
List<String> names = meths.getMethods();
assertNotNull(names);
assertEquals(1, names.size());
List<String> soll = Arrays.asList(new String[] {
Render1.class.getSimpleName() + "#render2a",
});
for (String name : names) {
assertTrue(soll.contains(name));
}
}
示例4: test4render
@Test
public void test4render() throws Exception {
String expectedMeth = TestPortlet4.class.getSimpleName() + "#myView";
PortletMode pm = PortletMode.HELP;
helper.render("Portlet4", pm, expectedMeth);
assertTrue(meths.isConfigExists());
}
示例5: test6doHelp
@Test
public void test6doHelp() throws Exception {
List<String> methNames = Arrays.asList(new String[] {
TestPortlet6.class.getSimpleName() + "#doHeaders",
TestPortlet6.class.getSimpleName() + "#doHelp",
});
PortletMode pm = PortletMode.HELP;
helper.renderWithHeaders("Portlet6", pm, methNames);
assertTrue(meths.isConfigExists());
}
示例6: invoke3a
@Test
public void invoke3a() throws Exception {
meths.reset();
PortletInvoker i = new PortletInvoker(ams, "portlet3");
PortletMode mode = PortletMode.HELP;
req.setMode(mode);
i.renderHeaders(req, resp);
List<String> names = meths.getMethods();
assertNotNull(names);
assertEquals(1, names.size());
List<String> soll = Arrays.asList(new String[] {
Header1.class.getSimpleName() + "#header3e"
});
assertArrayEquals(soll.toArray(), names.toArray());
}
示例7: invoke6a
@Test
public void invoke6a() throws Exception {
meths.reset();
PortletInvoker i = new PortletInvoker(ams, "portlet6");
PortletMode mode = PortletMode.HELP;
req.setMode(mode);
i.renderHeaders(req, resp);
List<String> names = meths.getMethods();
assertEquals(2, names.size());
List<String> soll = Arrays.asList(new String[] {
Header2.class.getSimpleName() + "#header6and7",
Header2.class.getSimpleName() + "#header6andStar",
});
assertArrayEquals(soll.toArray(), names.toArray());
}
示例8: invoke7
@Test
public void invoke7() throws Exception {
meths.reset();
PortletInvoker i = new PortletInvoker(ams, "portlet7");
PortletMode mode = PortletMode.HELP;
req.setMode(mode);
i.renderHeaders(req, resp);
List<String> names = meths.getMethods();
assertNotNull(names);
assertEquals(1, names.size());
List<String> soll = Arrays.asList(new String[] {
Header2.class.getSimpleName() + "#header6and7"
});
assertArrayEquals(soll.toArray(), names.toArray());
}
示例9: invoke1a
@Test
public void invoke1a() throws Exception {
meths.reset();
PortletInvoker i = new PortletInvoker(ams, "portlet1");
PortletMode mode = PortletMode.HELP;
req.setMode(mode);
i.render(req, resp);
List<String> names = meths.getMethods();
assertNotNull(names);
assertEquals(0, names.size());
}
示例10: invoke3a
@Test
public void invoke3a() throws Exception {
meths.reset();
PortletInvoker i = new PortletInvoker(ams, "portlet3");
PortletMode mode = PortletMode.HELP;
req.setMode(mode);
i.render(req, resp);
List<String> names = meths.getMethods();
assertNotNull(names);
assertEquals(1, names.size());
List<String> soll = Arrays.asList(new String[] {
Render1.class.getSimpleName() + "#render3e"
});
assertArrayEquals(soll.toArray(), names.toArray());
}
示例11: invoke6a
@Test
public void invoke6a() throws Exception {
meths.reset();
PortletInvoker i = new PortletInvoker(ams, "portlet6");
PortletMode mode = PortletMode.HELP;
req.setMode(mode);
i.render(req, resp);
List<String> names = meths.getMethods();
assertEquals(0, names.size());
}
示例12: invoke7
@Test
public void invoke7() throws Exception {
meths.reset();
PortletInvoker i = new PortletInvoker(ams, "portlet7");
PortletMode mode = PortletMode.HELP;
req.setMode(mode);
i.render(req, resp);
List<String> names = meths.getMethods();
assertNotNull(names);
assertEquals(0, names.size());
}