コード例 #1
0
        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));
            }
        }
コード例 #2
0
        public bool GetSmtpAuthenticationNecessary()
        {
            bool setting = _configurationReader.GetRequiredBooleanSetting("SmtpAuthenticationNecessary");

            return(setting);
        }