createJsonResponseTest method
Implementation
String createJsonResponseTest(
String pathTestPage,
String featureName,
String pageName,
String apiName,
String jsonResponse,
) {
final path = join(pathTestPage, 'json');
DirectoryHelper.createDir(path);
String formattedJsonString = jsonResponse.toString();
try {
Map<String, dynamic> jsonObject = json.decode(jsonResponse);
jsonObject = processJson(jsonObject);
formattedJsonString = json.encode(jsonObject);
} catch (_) {}
join(path, '${apiName.snakeCase}_success.json').write(formattedJsonString);
StatusHelper.generated(join(path, '${apiName.snakeCase}_success.json'));
return formattedJsonString;
}