public SingleObjectModel GetLedgerAccount([FromUri] string ledgerUID, [FromUri] int accountId) { using (var usecases = LedgerUseCases.UseCaseInteractor()) { LedgerAccountDto ledgerAccount = usecases.GetLedgerAccount(ledgerUID, accountId); return(new SingleObjectModel(base.Request, ledgerAccount)); } }
public void Should_Get_A_Ledger_Account() { LedgerAccountDto ledgerAccount = _usecases.GetLedgerAccount(TestingConstants.LEDGER_UID, TestingConstants.LEDGER_ACCOUNT_ID); Assert.Equal(TestingConstants.LEDGER_UID, ledgerAccount.Ledger.UID); Assert.Equal(TestingConstants.LEDGER_ACCOUNT_ID, ledgerAccount.Id); Assert.NotEmpty(ledgerAccount.CurrencyRules); Assert.NotEmpty(ledgerAccount.SectorRules); }