예제 #1
0
        public async Task <bool> HandleAsync(AddNotificationRefund message)
        {
            await
            importRefundTransaction.Save(message.ImportNotificationId, message.Date, message.Amount,
                                         message.Comments);

            await context.SaveChangesAsync();

            return(true);
        }
예제 #2
0
        public async Task RefundAmountCannotExceedAmountPaid()
        {
            Func <Task> testCode = () => refundTransaction.Save(notificationId, new DateTime(2016, 1, 1), 101, "comment");

            await Assert.ThrowsAsync <InvalidOperationException>(testCode);
        }