public void Should_read_smtp_authentication_necessary() { MockRepository mocks = new MockRepository(); IConfigurationReader reader = mocks.CreateMock <IConfigurationReader>(); using (mocks.Record()) { Expect.Call(reader.GetRequiredBooleanSetting("SmtpAuthenticationNecessary")).Return(true); } using (mocks.Playback()) { IApplicationSettings settings = new ApplicationSettings(reader); Assert.That(settings.GetSmtpAuthenticationNecessary(), Is.EqualTo(true)); } }
public bool GetSmtpAuthenticationNecessary() { bool setting = _configurationReader.GetRequiredBooleanSetting("SmtpAuthenticationNecessary"); return(setting); }