Beispiel #1
0
        public async Task MinimumHighLoss_Should_SellCoin()
        {
            await _cryptoTrader.StartAsync(_defaultMarket);

            await RaiseMarketUpdate(110);
            await RaiseMarketUpdate(107);

            _cryptoApiMock.Verify(c => c.SellCoinAsync(It.IsAny <CryptoOrder>()), Times.Once);
        }
Beispiel #2
0
        public async Task TraderWithNoCoin_Should_CreateTwoBuyTrades()
        {
            await _cryptoTrader.StartAsync("");

            _cryptoApiMock.Verify(c => c.BuyCoinAsync(It.IsAny <CryptoOrder>()), Times.Exactly(2));
        }