You are here: DevOps > PegaUnit testing > PegaUnit test cases > Configuring property assertions

Configuring property assertions

You can configure property assertions to compare the expected value of one or more properties with the actual values that are returned by a rule.

  1. Open the PegaUnit test case if it is not already open.

  2. Complete one of the following actions:

  3. From the Assertion type list, select Property.

  4. Add properties to the assertion.

  5. From the Comparator list, select the comparator that you want to use to compare the property with a specified value.

    You can use the is in comparator to compare a text, integer, or decimal property to multiple values so that the assertion passes if the property matches any of the values that you specify. You can also use the is not in comparator so that the assertion passes if the property does not match any of the values that you specify.

    Separate values for the is in or is not in comparator by using the pipe (|) character. For text properties, use double quotation marks at the beginning and end of the value, for example, "23|15|88".

    For example, if you want the assertion to pass when Age property matches either the 5 or 7 values, configure the assertion as .Age is in 5|7.

  6. In the Value field, either enter a value with which to compare the property or open the Expression Builder by clicking the Gear icon to enter an expression that is used to provide the value.

    The Gear icon is not displayed until after you have saved the rule form.

  7. Optional: To add a comment, click the Add comment icon, enter a comment, and click OK.

  8. Click Done.

  9. Click Save in the rule form.