0

// I am using RestAssured with Java.

// I want to validate if my No 1 service fails and can't get the account number how can i use my hard //coded account number from no 2. Can someone help me on what error condition or strategy i can use? // Basically if No 1 fails then user No 2.

// No 1 Getting the account number from other class by calling another api


 acct= otherclass.getaccountNumber();
    queryParamerters.put("accountnumber",acct);

// No 2 Hard coded account number 
 queryParamerters.put("accountnumber","123456");
    
Sam1977
  • 15
  • 4

1 Answers1

0

create a flag, set it to 0 if No1 doesnt fails, if flag is 0, then use No2

learningIsFun
  • 142
  • 1
  • 9