public async Task ShouldInsert_CashTransaction_UsingCashAccountAggregate() { CashAccount account = await _cashAcctRepo.GetByIdAsync(new Guid("6a7ed605-c02c-4ec8-89c4-eac6306c885e")); CashAccountTransaction transaction = new CashAccountTransaction ( CashTransactionType.CashDisbursementLoanPayment, CashAccountId.Create(account.Id), CashAcctTransactionDate.Create(new DateTime(2021, 11, 7)), CashAcctTransactionAmount.Create(4363.82M), ExternalAgentId.Create(new Guid("12998229-7ede-4834-825a-0c55bde75695")), EconomicEventId.Create(new Guid("cf4279a1-da26-4d10-bff0-cf6e0933661c")), CheckNumber.Create("12214554"), "12M877", UserId.Create(new Guid("660bb318-649e-470d-9d2b-693bfb0b2744")) ); account.AddCashAccountTransaction(transaction); _cashAcctRepo.Update(account); await _unitOfWork.Commit(); }
public async Task ShouldInsert_CashAccount_UsingCashAccountRepo() { CashAccount account = new CashAccount ( CashAccountId.Create(new Guid("1e5b3dcf-9ffd-4671-95ee-373e4ca08804")), BankName.Create("ABCDEFG Banking & Hair Stylist, Inc."), CashAccountName.Create("Entertainment"), CashAccountNumber.Create("12345-678987"), RoutingTransitNumber.Create("125478991"), DateOpened.Create(new DateTime(2021, 11, 6)), UserId.Create(new Guid("660bb318-649e-470d-9d2b-693bfb0b2744")) ); await _cashAcctRepo.AddAsync(account); await _unitOfWork.Commit(); var result = await _cashAcctRepo.Exists(account.Id); Assert.True(result); }