SerializableListTester<T> constructor

SerializableListTester<T>({
  1. required String testGroupName,
  2. required String mainTestName,
  3. required FutureOr<void> testFunction(
    1. T testInput,
    2. SerializableTester tester
    ),
  4. required Map<String, T Function()> testMap,
  5. ListTesterMode mode = ListTesterMode.testOutput,
})

testGroupName and mainTestName are passed as the test groups this tester is a part of.

mode determines the behaviour of runTests. If it's in ListTesterMode.generateOutput, an output file will be generated based on the output. If it's in ListTesterMode.testOutput the output will be tested against the output file generated with a previous run of ListTesterMode.generateOutput

testMap is a map with key being the test name of the test, and the value being a supplier for an initial testValue.

testFunction is the common test that will be run on everything in testMap. Use the provided SerializableTester to add your test values.

Implementation

SerializableListTester({
  required this.testGroupName,
  required this.mainTestName,
  required this.testFunction,
  required this.testMap,
  this.mode = ListTesterMode.testOutput,
});