fromJson static method
Implementation
static CockpitTestSuiteCaseSource fromJson(
Object? value, {
required String path,
}) {
final json = CockpitTestValueReader.object(value, path);
final kind = CockpitTestValueReader.string(json['kind'], '$path.kind');
return switch (kind) {
'inline' => CockpitTestSuiteInlineCaseSource.fromJson(value, path: path),
'file' => CockpitTestSuiteFileCaseSource.fromJson(value, path: path),
_ => throw FormatException(
'Unsupported suite case source at $path.kind.',
),
};
}