I have a Season class. This Season has a few properties: among them, a list of Games. This should be populated from the same source that populated the rest of the Season properties.
I have a test to ensure all items in that list are of type Game.
There is no hard requirement that a Season must contain any Games, so testing that the list is not empty would not be entirely correct -- however, the test Season I'm using has plenty of games in it.
Writing "the minimum amount of code to make a test pass" is already done, because it is the empty list (so there are no not-Game objects).
What would be the fundamental TDD way to get the production code to parse+add games to the Season object?
Would the pragmatic way be to test via the size?
An alternative would be to generate the list of Games in my test, and see if Season.games == list_of_games
The problem with that is that there are a crapload of Foreign relations that will be going into those games, making the test code equivilant to the method that I'm testing -- which I don't think is the way it should work.
Or should I build them "by hand" from the test data -- instead of parsing it?