public async void When_CustomerLoanQuote_Is_Null_Notifier_Throws()
 {
     ICustomerNotifierFilter notifier = new CustomerNotifierFilter(
         new MockNotificationService(),
         new MockCustomerRepository2(),
         MockLogger());
     await Assert.ThrowsAsync <ArgumentNullException>(
         async() =>
         await notifier.NotifyCustomer(
             null));
 }
        public async void When_Valid_CustomerLoanQuote_Is_Sent_Notifier_Sends_Message_To_Customer()
        {
            ICustomerNotifierFilter notifier = new CustomerNotifierFilter(
                new MockNotificationService(),
                new MockCustomerRepository2(),
                MockLogger());
            var quotesFromBanks = new LoanQuote[]
            {
                new LoanQuote
                {
                    ApprovableAmount = 90.0m,
                    Bank             = "ABN Amro"
                },
                new LoanQuote
                {
                    ApprovableAmount = 40.0m,
                    Bank             = "ING Vysya"
                }
            };

            var loanQuote = new CustomerLoanQuote
            {
                BSN = "12345",
                OriginalAmountRequested = 100.0m,
                Quotes = quotesFromBanks
            };

            await notifier.NotifyCustomer(loanQuote);

            MockNotificationService
            .SENT_MESSAGE
            .Should()
            .NotBeNull();
            MockNotificationService
            .SENT_MESSAGE
            .Should()
            .Be(
                JsonConvert
                .SerializeObject(
                    quotesFromBanks));
        }