ExceptionTests_PortletModeException_ApiRender.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:portals-pluto 作者:
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp)
    throws PortletException, IOException {

  long tid = Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR, tid);

  PrintWriter writer = portletResp.getWriter();

  JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();

  // Create result objects for the tests

  /* TestCase: V2ExceptionTests_PortletModeException_ApiRender_hasGetMode2 */
  /* Details: "Returns the PortletMode object causing this exception" */
  TestResult tr0 =
      tcd.getTestResultFailed(V2EXCEPTIONTESTS_PORTLETMODEEXCEPTION_APIRENDER_HASGETMODE2);
  PortletMode pm = new PortletMode("testmode");
  PortletModeException pme = new PortletModeException("Unsupported Mode Causing Exception", pm);
  if (pme.getMode().toString().equals("testmode")) {
    tr0.setTcSuccess(true);
  }
  tr0.writeTo(writer);

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号