Unit Test -Module

0
  How to delete specific record from table before inserting test data into the table ? For example in java we have option to achieve this concept : “DataOperation.CLEAN_INSERT”.    
asked
1 answers
0

There are a couple of answers possible:

  1. Before the insert in your Microflow, you retrieve the object from the database using XPath. Delete the object with a commit. After that, you can insert the new object.
  2. You could decide just to change the object (but that was not your question. By far this is the most performant option.
  3. If you are inside a loop you should not have a commit. If your number of records is small, you retrieve the data in a list before the loop. In the loop, you itter over the records and you manipulate the list (delete, add, change), use a find in the list to select the right record in the list. Outside of the loop you commit the list.

 

Go Make IT

answered