/**
   * Runs the tests and reports results.
   */
@Override
  public void run(RunNotifier runNotifier) {
    runNotifier.fireTestRunStarted(topLevelDesc);
    for (SelfTest selfTest : selfTests) {
      for (SelfTestCase selfTestCase : selfTest.getSelfTestCases()) {
        Description currentDesc = createTestCaseDescription(selfTestCase);
        runNotifier.fireTestStarted(currentDesc);
        try {
          selfTest.runTest(selfTestCase);
        } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException
            | AssertionError e) {
          runNotifier.fireTestFailure(new Failure(currentDesc, e));
        }
        runNotifier.fireTestFinished(currentDesc);
      }
    }
    // TODO: Fill in the Result instance appropriately.
    runNotifier.fireTestRunFinished(new Result());
  }
@Override
public void run(RunNotifier runNotifier) {
runNotifier.fireTestRunStarted(topLevelDesc);
for (SelfTest selfTest : selfTests) {
for (SelfTestCase selfTestCase : selfTest.getSelfTestCases()) {
Description currentDesc = createTestCaseDescription(selfTestCase);
runNotifier.fireTestStarted(currentDesc);
try {
selfTest.runTest(selfTestCase);
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException
| AssertionError e) {
runNotifier.fireTestFailure(new Failure(currentDesc, e));
}
runNotifier.fireTestFinished(currentDesc);
}
}
// TODO: Fill in the Result instance appropriately.
runNotifier.fireTestRunFinished(new Result());
}
@Override
public void run(RunNotifier runNotifier) {
runNotifier.fireTestRunStarted(topLevelDesc);
for (SelfTest selfTest : selfTests) {
for (SelfTestCase selfTestCase : selfTest.getSelfTestCases()) {
Description currentDesc = createTestCaseDescription(selfTestCase);
runNotifier.fireTestStarted(currentDesc);
try {
selfTest.runTest(selfTestCase);
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException
| AssertionError e) {
runNotifier.fireTestFailure(new Failure(currentDesc, e));
}
runNotifier.fireTestFinished(currentDesc);
}
}
// TODO: Fill in the Result instance appropriately.
runNotifier.fireTestRunFinished(new Result());
}
@Override
public void run(RunNotifier runNotifier) {
runNotifier.fireTestRunStarted(topLevelDesc);
for (SelfTest selfTest : selfTests) {
for (SelfTestCase selfTestCase : selfTest.getSelfTestCases()) {
Description currentDesc = createTestCaseDescription(selfTestCase);
runNotifier.fireTestStarted(currentDesc);
try {
selfTest.runTest(selfTestCase);
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException
| AssertionError e) {
runNotifier.fireTestFailure(new Failure(currentDesc, e));
}
runNotifier.fireTestFinished(currentDesc);
}
}
// TODO: Fill in the Result instance appropriately.
runNotifier.fireTestRunFinished(new Result());
}