public void Initialize_NoBrokerForOrder_SetNull()
        {
            _brokerA.GetQuote(10).Returns(default(decimal?));
            _brokerB.GetQuote(10).Returns(default(decimal?));

            _selector = new DigicoinBrokerSelector(new IDigicoinBroker[] { _brokerA, _brokerB });

            var result = _selector.GetQuote(10);

            Assert.IsNull(result);
        }
        public void Initialize_TwoBrokerForOrder_DoReplaceBiggerQuote()
        {
            _brokerA.GetQuote(10).Returns(20M);
            _brokerB.GetQuote(10).Returns(10M);

            _selector = new DigicoinBrokerSelector(new IDigicoinBroker[] { _brokerA, _brokerB });

            var result = _selector.GetQuote(10);

            Assert.AreEqual(_brokerB, result.Broker);
            Assert.AreEqual(10M, result.Value);
        }
        public void Initialize_OneBrokerForOrder_SetQuote()
        {
            _brokerA.GetQuote(10).Returns(10M);
            _brokerB.GetQuote(10).Returns(default(decimal?));

            _selector = new DigicoinBrokerSelector(new IDigicoinBroker[] { _brokerA, _brokerB });

            var result = _selector.GetQuote(10);

            Assert.AreEqual(_brokerA, result.Broker);
            Assert.AreEqual(10M, result.Value);
        }