Package junit.framework

Examples of junit.framework.TestResult.wasSuccessful()


    public void testDistributedRunWithTwoLocalhosts() {
        System.setProperty(DistributedTest.REMOTE_MACHINE_URLS, "http://localhost:8080, http://localhost:8080");
        TestResult result = TestRunner.run(new DistributedTest("testCollectResults"));
        assertEquals(1, result.runCount());
        assertTrue(result.wasSuccessful());
    }

    public void testDistributedRunWithInvalidHosts() {
        System.setProperty(DistributedTest.REMOTE_MACHINE_URLS, "http://fooXXX:1234, http://barXXX:5678");
        TestResult result = TestRunner.run(new DistributedTest("testCollectResults"));
View Full Code Here


    public void testDistributedRunWithInvalidHosts() {
        System.setProperty(DistributedTest.REMOTE_MACHINE_URLS, "http://fooXXX:1234, http://barXXX:5678");
        TestResult result = TestRunner.run(new DistributedTest("testCollectResults"));
        assertEquals(1, result.runCount());
        assertFalse(result.wasSuccessful());
    }

}
View Full Code Here

                sresult.setResponseCode(getErrorCode());
                sresult.setResponseMessage(getError());
                sresult.setResponseData(e.getMessage().getBytes());
                sresult.setSuccessful(false);
            }
            if ( !tr.wasSuccessful() ){
                sresult.setSuccessful(false);
                StringBuffer buf = new StringBuffer();
                buf.append( getFailure() );
                Enumeration en = tr.errors();
                while (en.hasMoreElements()){
View Full Code Here

    * @param args DOCUMENT_ME
    */
   public static void main( String[] args )
   {
      TestResult result = TestRunner.run( XmlBeansResourcePropertySetMetaDataTestCase.suite(  ) );
      if ( !result.wasSuccessful(  ) )
      {
         System.exit( 1 );
      }
   }

View Full Code Here

    * @param args DOCUMENT_ME
    */
   public static void main( String[] args )
   {
      TestResult result = TestRunner.run( XmlBeansResourcePropertyTestCase.suite() );
      if ( !result.wasSuccessful() )
      {
         System.exit( 1 );
      }
   }

View Full Code Here

              "loadTestResults.xml")),
     "UTF-8");
      int exitCode;
      try {
    TestResult r = aTestRunner.start(args);
    if (!r.wasSuccessful()) {
        exitCode = FAILURE_EXIT;
    }
    exitCode = SUCCESS_EXIT;
      } catch(Exception e) {
    System.err.println(e.getMessage());
View Full Code Here

    * @param args DOCUMENT_ME
    */
   public static void main( String[] args )
   {
      TestResult result = TestRunner.run( XmlBeansResourcePropertyTestCase.suite() );
      if ( !result.wasSuccessful() )
      {
         System.exit( 1 );
      }
   }

View Full Code Here

            _out.print(testCase.getName() + " > ");
            TestSuite suite = new TestSuite(testCase);
            TestResult result = new TestResult();
            result.addListener(_listener);
            suite.run(result);
            if (result.wasSuccessful()) {
                _out.println(" OK.");
            } else {
                _out.println(" NG.");
                for (Enumeration <TestFailure> i = result.failures();
                        i.hasMoreElements(); )
View Full Code Here

        // } catch (java.lang.InternalError e1){
        // System.out.println("Error with class "+n+" "+e1);
        // }
        //System.out.println("------------");
        // --
        System.exit(result.wasSuccessful() ? 0 : 1); // this is needed because the test may start the AWT EventQueue thread which is not a daemon.
    }

    /**
     * An overridable method that initializes the logging for the unit test run,
     * using the properties file passed in as the second argument.
View Full Code Here

        if (!isSecurityAvailable()) {
            return;
        }
        TestResult result = new TestResult();
        executeTests(new File("src/test"), result);
        if (!result.wasSuccessful()) {
            new SecurityTestResultPrinter(System.out).print(result);
            fail("At least one groovy testcase did not run under the secure groovy environment.  Results in the testcase output");
        }
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.