toJson method
Encodes this CockpitTestFixture as a JSON object.
Implementation
Map<String, Object?> toJson() => <String, Object?>{
'id': id,
'setup': setup.toJson(),
if (teardown != null) 'teardown': teardown!.toJson(),
'scope': scope.name,
if (targetId != null) 'targetId': targetId,
if (inputs.isNotEmpty) 'inputs': inputs,
if (dependsOn.isNotEmpty) 'dependsOn': dependsOn,
};