public void Should_read_service_sleep_time() { MockRepository mocks = new MockRepository(); IConfigurationReader reader = mocks.CreateMock <IConfigurationReader>(); using (mocks.Record()) { Expect.Call(reader.GetRequiredIntegerSetting("ServiceSleepTime")).Return(7); } using (mocks.Playback()) { IApplicationSettings settings = new ApplicationSettings(reader); Assert.That(settings.GetServiceSleepTime(), Is.EqualTo(7)); } }
public int GetServiceSleepTime() { int setting = _configurationReader.GetRequiredIntegerSetting("ServiceSleepTime"); return(setting); }