0
public void ClaimValidation() {

   float validateMemberPay = S3_1Response.jsonPath().get("planCopayAmount");
   softAssert.assertEquals(validateMemberPay, 300.00);
   float validatePlanPay = S3_1Response.jsonPath().get("planPayAmount");
   softAssert.assertEquals(validatePlanPay, 800.00, assertionMessage);
softAssert.AssertAll(); 

expected [300.0] but found [300.0],

ASSERTION HAS FAILED expected [800.0] but found [800.0]

Muazzam
  • 13
  • 1
  • 4
  • 2
    Not sure if this is the reason, but `300.00` is a `double`-literal; `300.00f` would be a `float`-literal. --- I strongly recommend to use neither `float` nor `double` for anything money- and currency-related. – Turing85 Jan 03 '23 at 19:55
  • 2
    you cannot compare floating point numbers directly, see https://stackoverflow.com/questions/5923682/comparing-floating-point-numbers-in-java – Pavel Jan 03 '23 at 19:57

0 Answers0