예제 #1
0
 public void BasicConfigProviderCallsWorkerWork()
 {
     var stubWorker = MockRepository.GenerateStub<IConfigWorker<SampleClass>>();
     var providerTest = new BasicConfigProvider<SampleClass>(stubWorker);
     providerTest.GetConfig();
     stubWorker.AssertWasCalled(w => w.Work());
 }
예제 #2
0
 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());
 }