test method

void test({
  1. UnitMocks? mocks,
})

Runs all UnitTest._features test methods.

Implementation

void test({UnitMocks? mocks}) {
  flutter_test.group(
    _description,
    () {
      final _mocks = mocks ?? UnitMocks();
      final _systemUnderTest = _systemUnderTestCallback?.call(_mocks);
      _setUpAndTeardown(mocks: _mocks, systemUnderTest: _systemUnderTest);
      for (int nrFeature = 0; nrFeature < _features.length; nrFeature++) {
        _features[nrFeature].test(
          testDescription: _description,
          nrFeature: nrFeature,
          mocks: mocks,
          systemUnderTest: _systemUnderTest,
        );
      }
    },
  );
}