Exemple #1
0
        public void GetAssetBalance_UnknownAsset_ReturnsZero()
        {
            var binanceClient = new Mock <IBinanceClient>();

            binanceClient.Setup(m => m.GetAccountInformation(5000))
            .ReturnsAsync(new AccountInformationResponse()
            {
                Balances = new List <BalanceResponse>()
                {
                    new BalanceResponse()
                    {
                        Asset = "BTC", Free = 1M
                    }
                }
            });
            var subject = new Binance(Mock.Of <IWebSocket>(), binanceClient.Object, Mock.Of <ITime>());

            var result = subject.GetAssetBalance(Assets.DOGE).Result;

            Assert.AreEqual(0, result);
        }