Example: lr.value_check

In the following example, the carmel.buyTomatoes method returns an integer. The lr.value_check function checks if it equals 500.

     _int1 = _carmel.buyTomatoes((int)20);
     lr.value_check(_int1, 500, lr.EQUALS);

If you want to check if the method does not return a certain value, modify the code as follows:

     _int1 = _carmel.buyTomatoes((int)20);
     lr.value_check(_int1, 10, lr.NOT_EQUALS);

During replay, the expected value was not detected. An exception occurred and the following information was logged in the Output window.

System.err: java.lang.Exception: lr.value_check failed.[Expected:500 Actual:5000]