CockpitTestImportResult.fromJson constructor

CockpitTestImportResult.fromJson(
  1. Object? value, {
  2. String path = r'$',
})

Decodes a CockpitTestImportResult from a JSON object.

Implementation

factory CockpitTestImportResult.fromJson(
  Object? value, {
  String path = r'$',
}) {
  final json = CockpitTestValueReader.object(value, path);
  CockpitTestValueReader.keys(
    json,
    const <String>{'case', 'manifest'},
    path,
    required: const <String>{'case', 'manifest'},
  );
  return CockpitTestImportResult(
    testCase: CockpitTestCase.fromJson(json['case'], path: '$path.case'),
    manifest: CockpitTestImportManifest.fromJson(
      json['manifest'],
      path: '$path.manifest',
    ),
  );
}