TestFailure.fromJson constructor
TestFailure.fromJson(
- Object? j
Implementation
factory TestFailure.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return TestFailure(
actualOutputUrl: switch (json['actualOutputUrl']) {
null => null,
Object $1 => decodeString($1),
},
actualRedirectResponseCode: switch (json['actualRedirectResponseCode']) {
null => null,
Object $1 => decodeInt($1),
},
actualService: switch (json['actualService']) {
null => null,
Object $1 => decodeString($1),
},
expectedOutputUrl: switch (json['expectedOutputUrl']) {
null => null,
Object $1 => decodeString($1),
},
expectedRedirectResponseCode:
switch (json['expectedRedirectResponseCode']) {
null => null,
Object $1 => decodeInt($1),
},
expectedService: switch (json['expectedService']) {
null => null,
Object $1 => decodeString($1),
},
headers: switch (json['headers']) {
null => [],
List<Object?> $1 => [for (final i in $1) UrlMapTestHeader.fromJson(i)],
_ => throw const FormatException('"headers" is not a list'),
},
host: switch (json['host']) {
null => null,
Object $1 => decodeString($1),
},
path: switch (json['path']) {
null => null,
Object $1 => decodeString($1),
},
);
}