public void Should_read_smtp_server() { var mocks = new MockRepository(); var reader = mocks.CreateMock<IConfigurationReader>(); using (mocks.Record()) { Expect.Call(reader.GetRequiredSetting("SmtpServer")).Return("localhost"); } using (mocks.Playback()) { IApplicationSettings settings = new ApplicationSettings(reader); Assert.That(settings.GetSmtpServer(), Is.EqualTo("localhost")); } mocks.VerifyAll(); }