0
kicks
Stubbing a File Stream, Memory Stream, or Stream « Composite Code
Here’s the class that has a Func setup as a property. The reason this is setup, is so that the stream can actually be stubbed on the ComplianceReportingJob. Otherwise if the Stream was just being used as is, instantiated in the class, or passed in via injection, we still couldn’t get it mocked or stubbed. Especially if the class ComplianceReportingJob is under test.
public class ComplianceReportingJob : IJob
{
readonly ITradeRepository tradeRepo;
readonly IFileSystem fileSys;
public Compl...