예제 #1
0
        public void IfMailServerIsUnavailableReturnsFailure()
        {
            var client = new EmailClient(incorrectMailServerConfiguration);

            GivenASimpleEmail();

            var result = client.Send(message);

            Assert.False(result.IsSuccess);
        }
예제 #2
0
        public void IfMailServerIsAvailableMailIsSent()
        {
            var client = new EmailClient(correctMailServerConfiguration);

            GivenASimpleEmail();

            var result = client.Send(message);

            Assert.True(result.IsSuccess);

            ThenSentEmailMatchesInput();
        }