Consider the following:
new SUT(null, null, new List<IObjectBeingMocked>() { mockObjectOne.Object, mockObjectTwo.Object })
My SUT (System Under Test) needs a list of objects as the third parameter. They should be mocking as I set some expectations on them.
How can I clear it to remove the need to call .Objectfor each item in the list? Usually there are only two elements, but this can grow, and in my opinion, this makes reading the test difficult.
What would be the best way to easily transform this list of mock objects into real objects?
source
share