Can we write code to make testing easier? For example: I have a list of people where each person can have a list of phones. I want to calculate the sum of the number of phones, or I want to check for duplicate phones in my list of people.
It's important that I individually create all the objects in my entry (in this case the list of people and the list of phones per person) or I can create a method that generates phone lists for me.
The question still goes deeper, does it generate this input by methods, or do I just go to an integration test involving a database?