To show more features of ecFeed, we will create an another test method. It will be named processLoanApplication and will exercise an algorithm that is deciding whether to grant a customer a loan. First, we will add parameters that define customer's name, gender and age. Add parameters named firstName, familyName, age and gender to the model and set their types to String, String, int and come.example.test.Gender accordingly. Now, we could add all the choices manually, as we did in the previous tutorial (or use the copy&paste function), but this wouldn't be optimal. It is much better to use global parameters for this purpose.
Click on the LoanDecisionTest class node with the right mouse button and select Add global parameter from the context menu. It will appear in the global parameters viewer in the class details page. Change the name of the parameter to gender and its type to com.example.test.Gender. You can simply copy and paste the choices for this parameter from the gender parameter in the generateCustomerData method. Now go to the processLoanApplication method details page and look at the parameters viewer. There should be a column named Link. You can use it to select a global parameter that will be linked to this parameter. Select com.example.test.LoadDecisionTest:gender. Now the gender parameter is defined by the global parameter. Any choice you will add to the global parameter will be automatically considered in the method parameter. In the same way you can change the corresponding parameter in the generateCustomerData method to be linked as well.
You can do the same procedure for the other parameters. To make it quicker, you can automatically convert a parameter to be linked, using drag&drop functionality. In the model page drag&drop the parameters firstName, familyName and age from generateCustomerData method to the LoanDecisionTest class node, keeping CTRL+SHIFT buttons pressed together. The parameters will be copied to the class node as a global parameters, while original nodes will be automatically changed to linked. Now you can set the corresponding parameters in the processLoanApplication method to be linked. Copy and paste the gender constraint from generateCustomerData to the processLoanApplication method.