public async Task <bool> HandleAsync(AddNotificationRefund message) { await importRefundTransaction.Save(message.ImportNotificationId, message.Date, message.Amount, message.Comments); await context.SaveChangesAsync(); return(true); }
public async Task RefundAmountCannotExceedAmountPaid() { Func <Task> testCode = () => refundTransaction.Save(notificationId, new DateTime(2016, 1, 1), 101, "comment"); await Assert.ThrowsAsync <InvalidOperationException>(testCode); }