Exemplo n.º 1
0
 public void Initalize()
 {
     _brokers = new DigicoinBrokerSelector(new IDigicoinBroker[] { _broker1, _broker2 });
     _trades = new TradeRepository();
     _reports = new DigicoinReports(_trades);
     _trader = new DigicoinTrader(_brokers, _trades);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initialize <see cref="DigicoinTrader"/> class.
 /// </summary>
 /// <param name="brokers">Digicoin trading brokers.</param>
 /// <param name="trades">Trades repository.</param>
 public DigicoinTrader(IDigicoinBrokerSelector brokers, ITradeRepository trades)
 {
     if (brokers == null)
     {
         throw new ArgumentNullException("brokers");
     }
     if (trades == null)
     {
         throw new ArgumentNullException("trades");
     }
     _trades = trades;
     _brokers = brokers;
 }
Exemplo n.º 3
0
 public void Initialize()
 {
     _brokers = Substitute.For<IDigicoinBrokerSelector>();
     _repository = Substitute.For<ITradeRepository>();
     _trader = new DigicoinTrader(_brokers, _repository);
 }