BinaryStudio.ClientManager.DomainModel.Tests.Input.MailMessageParserTests.Should_ThrowException_WhenCalledGetSenderWithNoEmailAddressInBody C# (CSharp) Метод

Should_ThrowException_WhenCalledGetSenderWithNoEmailAddressInBody() приватный Метод

private Should_ThrowException_WhenCalledGetSenderWithNoEmailAddressInBody ( ) : void
Результат void
        public void Should_ThrowException_WhenCalledGetSenderWithNoEmailAddressInBody()
        {
            //arrange
            var mailMessage = new MailMessage
                                  {
                                      Body = "No email addresses there"
                                  };
            var mailMessageParser = new MailMessageParserThunderbird();

            //act
            Action action = () => mailMessageParser.GetSender(mailMessage);

            //assert
            action
                .ShouldThrow<ApplicationException>()
                .WithMessage("Forwarded message has illegal format");
        }