Test constructor

Test({
  1. required int id,
  2. required String name,
  3. @JsonKey(name: 'suiteID') required int suiteId,
  4. @JsonKey(name: 'groupIDs') required List<int> groupIds,
  5. int? line,
  6. int? column,
  7. String? url,
  8. @JsonKey(name: 'root_line') int? rootLine,
  9. @JsonKey(name: 'root_column') int? rootColumn,
  10. @JsonKey(name: 'root_url') String? rootUrl,
})

Factory constructor to create a Test

Implementation

factory Test({
  /// An opaque ID for this test.
  required int id,

  /// The name of this test, including prefixes from any containing groups.
  required String name,

  /// The ID of the suite containing this test.
  @JsonKey(name: 'suiteID') required int suiteId,

  /// The IDs of groups containing this test, in order from outermost to innermost.
  @JsonKey(name: 'groupIDs') required List<int> groupIds,

  /// The (1-based) line on which this test was defined, or `null`.
  int? line,

  /// The (1-based) column on which this test was defined, or `null`.
  int? column,

  /// The URL for the file in which this test was defined, or `null`.
  String? url,

  /// The (1-based) line in the original test suite from which this test originated.
  ///
  /// Will only be present if `rootUrl` is different from `url`.
  @JsonKey(name: 'root_line') int? rootLine,

  /// The (1-based) line on in the original test suite from which this test originated.
  ///
  /// Will only be present if `rootUrl` is different from `url`.
  @JsonKey(name: 'root_column') int? rootColumn,

  /// The URL for the original test suite in which this test was defined.
  ///
  /// Will only be present if different from `url`.
  @JsonKey(name: 'root_url') String? rootUrl,
}) = _Test;