Test constructor

Test(
  1. {bool active = true,
  2. String? name,
  3. int? pinnedStepIndex,
  4. List<TestStep>? steps,
  5. String? suiteName,
  6. DateTime? timestamp,
  7. int version = 0}
)

Constructs the test.

Implementation

Test({
  this.active = true,
  this.name,
  int? pinnedStepIndex,
  List<TestStep>? steps,
  this.suiteName,
  DateTime? timestamp,
  this.version = 0,
})  : steps = steps == null ? <TestStep>[] : List<TestStep>.from(steps),
      timestamp = timestamp ?? DateTime.now() {
  this.pinnedStepIndex =
      min(pinnedStepIndex ?? this.steps.length - 1, this.steps.length - 1);
}