Say I have this class:
public abstract class CustomerCollectionBase : Collection<Customer>{}
One of my tested classes accepts an instance of CustomerCollectionBase (this will be some subclass). In the test method, this collection is transferred through a cycle, and the results are analyzed and processed. eg:
for (int i=0;i<_customers.Count; i++){
}
Is it possible to stub this collection with Moq so that I can pass the stub depending on my constructor under the class?
Thanks.
source
share