You need to sign in to do that
Don't have an account?
Sadik Shaik 3
How to cover these lines in test class for response
Below is the code:
if (response.getStatusCode() == 200) {
string jsonresponse = response.getBody();
}
else if(response.getStatusCode() == 400){
sMessage = 'Bad Request: This response means that target system could not understand the request due to invalid syntax.';
displayMessage(sMessage);
}
Can anyone help me on this to cover the above lines of code in test class?
Thanks in Advance
if (response.getStatusCode() == 200) {
string jsonresponse = response.getBody();
}
else if(response.getStatusCode() == 400){
sMessage = 'Bad Request: This response means that target system could not understand the request due to invalid syntax.';
displayMessage(sMessage);
}
Can anyone help me on this to cover the above lines of code in test class?
Thanks in Advance
I am unable to cover the above code.
Can you please send me the mock response code and how to call the method in test class?
Thanks in advance