Package org.apache.pluto.testsuite

Examples of org.apache.pluto.testsuite.TestResults


     */
    public TestResults doTest(PortletConfig config,
                              PortletContext context,
                              PortletRequest request,
                              PortletResponse response) {
        TestResults results = new TestResults(getTestSuiteName());
       
        for (Iterator it = getCheckMethods().iterator(); it.hasNext(); ) {
          Method method = (Method) it.next();
          debugWithName("Invoking test method: " + method.getName());
          try {
            TestResult result = invoke(method, config, context, request, response);
            if (result.getName() == null) {
              result.setName(method.getName());
            }
            results.add(result);
            debugWithName("Result: " + result.getReturnCodeAsString());
          } catch (Throwable th) {
            String message = "Error invoking " + method.getName()
                + " (" + th.getClass().getName() + "): "
                + th.getMessage();
            errorWithName(message, th);
            TestResult result = new TestResult();
            result.setName(method.getName());
            result.setReturnCode(TestResult.FAILED);
            result.setResultMessage(message);
            results.add(result);
            }
        }
       
        return results;
    }
View Full Code Here


     */
    public TestResults doTest(PortletConfig config,
                              PortletContext context,
                              PortletRequest request,
                              PortletResponse response) {
        TestResults results = new TestResults(getTestSuiteName());
       
        for (Iterator it = getCheckMethods().iterator(); it.hasNext(); ) {
          Method method = (Method) it.next();
          debugWithName("Invoking test method: " + method.getName());
          try {
            TestResult result = invoke(method, config, context, request, response);
            if (result.getName() == null) {
              result.setName(method.getName());
            }
            results.add(result);
            debugWithName("Result: " + result.getReturnCodeAsString());
          } catch (Throwable th) {
            String message = "Error invoking " + method.getName()
                + " (" + th.getClass().getName() + "): "
                + th.getMessage();
            errorWithName(message, th);
            TestResult result = new TestResult();
            result.setName(method.getName());
            result.setReturnCode(TestResult.FAILED);
            result.setResultMessage(message);
            results.add(result);
            }
        }
       
        return results;
    }
View Full Code Here

     */
    public TestResults doTest(PortletConfig config,
                              PortletContext context,
                              PortletRequest request,
                              PortletResponse response) {
        TestResults results = new TestResults(getTestSuiteName());

        for (Iterator it = getCheckMethods().iterator(); it.hasNext(); ) {
          Method method = (Method) it.next();
          debugWithName("Invoking test method: " + method.getName());
          try {
            TestResult result = invoke(method, config, context, request, response);
            if (result.getName() == null) {
              result.setName(method.getName());
            }
            results.add(result);
            debugWithName("Result: " + result.getReturnCodeAsString());
          } catch (Throwable th) {
            String message = "Error invoking " + method.getName()
                + " (" + th.getClass().getName() + "): "
                + th.getMessage();
            errorWithName(message, th);
            TestResult result = new TestResult();
            result.setName(method.getName());
            result.setReturnCode(TestResult.FAILED);
            result.setResultMessage(message);
            results.add(result);
            }
        }

        return results;
    }
View Full Code Here

     */
    public TestResults doTest(PortletConfig config,
                              PortletContext context,
                              PortletRequest request,
                              PortletResponse response) {
        TestResults results = new TestResults(getTestSuiteName());

        for (Method method : getCheckMethods(request)) {
            try {
                TestResult result = invoke(method, config, context, request, response);
                if (result.getName() == null) {
                    result.setName(method.getName());
                }
                results.add(result);
            } catch (Throwable th) {
                if (th instanceof InvocationTargetException
                        && th.getCause() != null) {
                    th = th.getCause();
                }
                String message = "Error invoking " + method.getName()
                        + " (" + th.getClass().getName() + "): "
                        + th.getMessage();
                errorWithName(message, th);
                TestResult result = new TestResult();
                result.setName(method.getName());
                result.setReturnCode(TestResult.FAILED);
                result.setResultMessage(message);
                results.add(result);
            }
        }

        return results;
    }
View Full Code Here

TOP

Related Classes of org.apache.pluto.testsuite.TestResults

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.