G-wagon
8 years agoRegular Contributor
Code
Hi all
I used the below code expression to validate that the value in Tax Free Cash Limit field is 25% of the FundValue field.
Round(Aliases.TransactConsole.omTransactFormWizar...
Hi Gary,
Considering, that you are working with money, the behavior of Round() function seems to be correct - it rounded to the nearest even in your sample as expected (https://blogs.msdn.microsoft.com/ericlippert/2003/09/26/bankers-rounding/).
So, maybe, you need to talk to your business analysts and discuss if correct rounding scheme is used in the tested application.
In case you really need other type of rounding, this might help: http://www.vb-helper.com/howto_round_to_specified_digits.html
P.S. Provided code snippet seems to be not from the actual test code. I would expect this one:
Round(aqConvert.VarToFloat(<EditFundValueFac>.wText) * 25/100, 2)