Script Assertion adding two decimal values suddenly is failing
So this worked last week (no changes other than the WSDL did change)...
CODE (abbreviated)
I have 3 defined (context.expand) values that are all decimal
def a = context.expand(<path>) as int // = 43680.59
def b = context.expand(<path>) as int // = 3000
response = context.expand(<path>) as int // = 46680.59
def total = a + b
assert total == response
Run Error = "For input string: "43680.59"
Why is this suddently not working?
IF I remove the "as int" - it runs but it's "combining"/"concatinating" a & b together as strings
Thanks for your hlep in advance
Well this is why I'm a rookie... the fix is stupid easy (unless i run into another hiccup)
Just adding ".toBigDecimal()" after my context.expand lines did the trick.
Of coruse the math equation i had to put "as String" in order for SoapUI to not compare the BigDecimal to the actual 2 decimal output