toJson method

Map<String, Object?> toJson()

Serializes the smoke case to stable JSON.

Implementation

Map<String, Object?> toJson() {
  return <String, Object?>{
    'id': id,
    'method': method,
    'endpoint': endpoint,
    if (body.isNotEmpty) 'body': body,
    'expectedStatus': expectation.expectedStatus,
    'expectJsonObject': expectation.expectJsonObject,
  };
}