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

            GivenASimpleEmail();

            var result = client.Send(message);

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

            GivenASimpleEmail();

            var result = client.Send(message);

            Assert.True(result.IsSuccess);

            ThenSentEmailMatchesInput();
        }