public void BasicConfigProviderCallsWorkerWork() { var stubWorker = MockRepository.GenerateStub<IConfigWorker<SampleClass>>(); var providerTest = new BasicConfigProvider<SampleClass>(stubWorker); providerTest.GetConfig(); stubWorker.AssertWasCalled(w => w.Work()); }
public void BasicConfigProviderCallsWorkForEachConfig() { var workerStub = MockRepository.GenerateStub<IConfigWorker<SampleClass>>(); var providerTest = new BasicConfigProvider<SampleClass>(workerStub); providerTest.GetConfig(); providerTest.GetConfig(); workerStub.AssertWasCalled(w => w.Work(), o => o.Repeat.Twice()); }