Esempio n. 1
0
        public void TestExecuteForInvoiceWithNoEmailAddressShouldThrowException()
        {
            _invoice.EmailAddress = string.Empty;

            Assert.That(() => _command.Execute(InvoiceId),
                        Throws.TypeOf <EmailAddressIsBlankException>());
        }
Esempio n. 2
0
        public void TestExecuteShouldEmailInvoice()
        {
            _command.Execute(InvoiceId);

            _mocker.GetMock <IInvoiceEmailer>()
            .Verify(p => p.Email(_invoice),
                    Times.Once);
        }