Function isSuccess

Check if a suite result list is a success

bool isSuccess (
  SuiteResult[] results
);

Example

It should return true for an empty result

[].isSuccess.should.equal(true);

Example

It should return true if all the tests succeded

SuiteResult[] results = [ SuiteResult("") ];
results[0].tests = [ new TestResult("") ];
results[0].tests[0].status = TestResult.Status.success;

results.isSuccess.should.equal(true);

Example

It should return false if one the tests failed

SuiteResult[] results = [ SuiteResult("") ];
results[0].tests = [ new TestResult("") ];
results[0].tests[0].status = TestResult.Status.failure;

results.isSuccess.should.equal(false);

Example

It should return the name of this test

if(LifeCycleListeners.instance is null || !LifeCycleListeners.instance.isRunning) {
  return;
}

LifeCycleListeners.instance.runningTest.should.equal("trial.runner.It should return the name of this test");