Package ar.edu.unlp.yaqc4j.runners.statements

Examples of ar.edu.unlp.yaqc4j.runners.statements.QCCheckStatement


          }
        }.run();
      } catch (Throwable e) {
        new Fail(e).evaluate();
      }
      QCCheckStatement qcStatement = methodInvoker(method, test);
      Statement statement = methodBlock(method, qcStatement);
//      if (method.getMethod().getParameterTypes().length == 0) {
//        // If this is a test that has no parameters, only
//        // run it once as JUnit normally does
//        statement.evaluate();
//        System.out.println(method.getName() + ": OK. Passed 1 tests.");
//      } else {
        for (int i = 0; i < qcStatement.getMaxNumberOfTests(); i++) {
          try {
            statement.evaluate();
          } catch(Yaqc4jAssertionFailedError failure){
            System.out.println(method.getName() + " failed. " + failure.getMessage());
            throw failure;
          } catch(AssertionError failure){
            System.out.println(method.getName() + ": Failed after " + (i + 1) + " tests." + failure.getMessage());
            throw failure;
          }
        }
        for (Collector collector: qcStatement.getcollectors()){
          if (collector != null){
            System.out.println(collector.printResults());
          }
        }
        for (ClassifyResults classifiers: qcStatement.getClassifiers()){
          if (classifiers != null){
            System.out.println(classifiers.printResults());
          }
        }
        System.out.println(method.getName() + ": OK. Passed " + qcStatement.getMaxNumberOfTests() + " tests.");
//      }
    } catch (AssumptionViolatedException e) {
      eachNotifier.addFailedAssumption(e);
    } catch (Throwable e) {
      eachNotifier.addFailure(e);
View Full Code Here


          generators.remove(gen.klass());
          this.addGenerator(gen, generators);
        }
      }

      return new QCCheckStatement(conf, generators, method, test);
    } catch (Exception ex) {
      throw new RuntimeException(
          "Unable to reconfigure the test configuration.", ex);
    }
  }
View Full Code Here

TOP

Related Classes of ar.edu.unlp.yaqc4j.runners.statements.QCCheckStatement

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.