Ejemplo n.º 1
0
        public ExchangeUpdateRepositoryTests()
        {
            _repo = new ExchangeUpdateRepository();

            // first clear out the table
            var deleted = _repo.DeleteAll().Result;

            // then add some data for testing
            datas.Add(
                new ExchangeUpdate
            {
                Id       = 0,
                Exchange = Business.Entities.Exchange.Binance,
                UpdateAt = DateTime.UtcNow
            });
            datas.Add(
                new ExchangeUpdate
            {
                Id       = 0,
                Exchange = Business.Entities.Exchange.Bittrex,
                UpdateAt = DateTime.UtcNow
            });

            var addedEntites = _repo.AddAll(datas).Result;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="exchangeApiBldr">Exchange Api Builder</param>
 /// <param name="exchangeUpdateRepo">Exchange Update repository</param>
 /// <param name="arbitragePathRepo">Arbitrage Path repository</param>
 /// <param name="arbitrageBuilder">Arbitrage builder</param>
 /// <param name="cmcBuilder">CMC builder</param>
 public ExchangeBuilder(IExchangeApiBuilder exchangeApiBldr,
                        IExchangeUpdateRepository exchangeUpdateRepo,
                        IArbitragePathRepository arbitragePathRepo,
                        IArbitrageBuilder arbitrageBuilder,
                        ICMCBuilder cmcBuilder)
 {
     _exchangeApiBldr    = exchangeApiBldr;
     _exchangeUpdateRepo = exchangeUpdateRepo;
     _arbitragePathRepo  = arbitragePathRepo;
     _arbitrageBldr      = arbitrageBuilder;
     _cmcBldr            = cmcBuilder;
     LoadBuilder().RunSynchronously();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Constructor for unit tests
 /// </summary>
 /// <param name="exchangeApiBldr">Exchange Api Builder</param>
 /// <param name="exchangeUpdateRepo">Exchange Update repository</param>
 /// <param name="arbitragePathRepo">Arbitrage Path repository</param>
 /// <param name="arbitrageBuilder">Arbitrage builder</param>
 /// <param name="exchangeHubRepo">Exchange Hub repository</param>
 /// <param name="cmcBuilder">CMC builder</param>
 public ExchangeBuilder(IExchangeApiBuilder exchangeApiBldr,
                        IExchangeUpdateRepository exchangeUpdateRepo,
                        IArbitragePathRepository arbitragePathRepo,
                        IArbitrageBuilder arbitrageBuilder,
                        IExchangeHubRepository exchangeHubRepo,
                        ICMCBuilder cmcBuilder)
 {
     _exchangeApiBldr    = exchangeApiBldr;
     _exchangeUpdateRepo = exchangeUpdateRepo;
     _arbitragePathRepo  = arbitragePathRepo;
     _arbitrageBldr      = arbitrageBuilder;
     currentHub          = exchangeHubRepo;
     _cmcBldr            = cmcBuilder;
     currentExchange     = "Binance";
     LoadBuilder(true).RunSynchronously();
 }