public void TestBalanceQueryService_WhenAccountIdIsSupplied_ItShouldReturnListOfBalanceDetails()
        {
            IFundsPersistenceRepository repository = (IFundsPersistenceRepository)ContextRegistry.GetContext()["FundsPersistenceRepository"];
            Balance balance  = new Balance(new Currency("BTC"), new AccountId(1), 1000, 1000);
            Balance balance2 = new Balance(new Currency("LTC"), new AccountId(1), 2000, 2000);

            repository.SaveOrUpdate(balance);
            repository.SaveOrUpdate(balance2);
            IBalanceQueryService  _balanceQueryService = (IBalanceQueryService)ContextRegistry.GetContext()["BalanceQueryService"];
            List <BalanceDetails> balanceDetailses     = _balanceQueryService.GetBalances(new AccountId(1));

            Assert.NotNull(balanceDetailses);
            Assert.AreEqual(2, balanceDetailses.Count);
            Assert.AreEqual(balanceDetailses[0].Currency, "BTC");
            Assert.AreEqual(balanceDetailses[0].Balance, 1000);
            Assert.AreEqual(balanceDetailses[1].Currency, "LTC");
            Assert.AreEqual(balanceDetailses[1].Balance, 2000);
        }
 public BalanceController(IBalanceQueryService balanceQueryService, IApiKeyInfoAccess apiKeyInfoAccess)
 {
     _balanceQueryService = balanceQueryService;
     _apiKeyInfoAccess    = apiKeyInfoAccess;
 }