Task 3: Customizing the Expected Results sheet
You add a new test in the Expected Results sheet.
About this task
Now that you have configured your BOM so that it generates the correct columns with meaningful names, you want to add some tests to the Expected Results sheet of the Excel scenario file.
You want to test:
- If the loan is approved.
- The first message that is displayed when you run the rules.
The Report class contains a method that returns a collection of messages (java.util.List). When using an Excel scenario file, you can only define tests that verify what is contained in the collection, that is, regardless of the position of the contained element in the collection. To be able to test exactly what the first message in the collection is, you must define a new method in the BOM.
In this task, you create a new column for the Expected Results sheet to test the first message.
You must create a virtual attribute and define a getter that returns only the first message.
Procedure
What to do next
In the next task, you create a new input parameter to define what kind of property the borrower has.
