Esempio n. 1
0
        public void OrderBooks_PrepareForEnumeration_1_1_1_Test()
        {
            var orderBooks = GetOrderBooks(_btceur.Invert(), _eurchf.Invert(), _chfusd.Invert());

            var result = SynthOrderBook.PrepareForEnumeration(orderBooks, _btcusd);

            AssertChained3(result);
        }
Esempio n. 2
0
        public void OrderBooks_PrepareForEnumeration_0_0_Test()
        {
            var orderBooks = GetOrderBooks(_btceur, _eurusd);

            var result = SynthOrderBook.PrepareForEnumeration(orderBooks, _btcusd);

            AssertChained2(result);
        }
Esempio n. 3
0
        public void OrderBooks_PrepareForEnumeration_0_Test()
        {
            var orderBook = new OrderBook("FE", _btcusd, new List <LimitOrder>(), new List <LimitOrder>(), DateTime.UtcNow);
            var result    = SynthOrderBook.PrepareForEnumeration(new List <OrderBook> {
                orderBook
            }, _btcusd);

            Assert.Single(result);
            Assert.True(result.Single().Key.Equals(_btcusd));
            Assert.True(result.Single().Value.AssetPair.EqualOrInverted(_btcusd));
        }
Esempio n. 4
0
        public void OrderBooks_PrepareForEnumeration_1_Test()
        {
            var usdbtc    = _btcusd.Invert();
            var orderBook = new OrderBook("FE", usdbtc, new List <VolumePrice>(), new List <VolumePrice>(), DateTime.UtcNow);

            var result = SynthOrderBook.PrepareForEnumeration(new List <OrderBook> {
                orderBook
            }, _btcusd);

            Assert.Single(result);
            Assert.True(result.Single().Key.Equals(_btcusd));
            Assert.True(result.Single().Value.AssetPair.IsEqualOrInverted(_btcusd));
        }