Here's a proposed answer based on comments from Mark Seemann so far. I'll modify this as appropriate if this wasn't what he was hinting at...
It seems I may have been overthinking things a bit. If I need 4 CallingBird
instances for my SUT's method, then I can simply ask for those instances in separate parameters in the unit test signature like this:
[Theory, Autodata]
public void All_Birds_Are_Populated(
CallingBird bird1,
CallingBird bird2,
CallingBird bird3,
CallingBird bird4,
Recipient sut)
{
sut.Receive(bird1, bird2, bird3, bird4);
Assert.NotNull(sut.Bird1);
Assert.NotNull(sut.Bird2);
Assert.NotNull(sut.Bird3);
Assert.NotNull(sut.Bird4);
}
If the parameter list gets too long, then it may be identifying a code smell in my SUT's method signature. If it's not a code smell, then I should be able to tolerate at least the same number of parameters in my test method as I do in my SUT's method.
I suppose I could ask for arrays in the test method like in the OP to save space, but that's probably at the expense of showing clear intent.