public void ConfigWorkerCallsDeserializerDeserialize() { var stubReader = MockRepository.GenerateStub<IConfigReader>(); var stubDeserializer = MockRepository.GenerateStub<IDeserializer>(); var workerTest = new ConfigWorker<SampleClass>(stubReader, stubDeserializer); workerTest.Work(); stubDeserializer.AssertWasCalled(d => d.Deserialize<SampleClass>(Arg<string>.Is.Anything), o => o.Repeat.Once()); }
public void ConfigWorkerCallsConfigReaderRead() { var stubReader = MockRepository.GenerateStub<IConfigReader>(); var stubDeserializer = MockRepository.GenerateStub<IDeserializer>(); var workerTest = new ConfigWorker<object>(stubReader, stubDeserializer); workerTest.Work(); stubReader.AssertWasCalled(r => r.ReadConfig(), o => o.Repeat.Once()); }