public ArbitragePathRepositoryTests() { _repo = new ArbitragePathRepository(); // first clear out the table var deleted = _repo.DeleteAll().Result; // then add some data for testing datas.Add( new ArbitragePath { Id = 0, Created = DateTime.UtcNow, Path = "Pair 1,Pair 2,Pair 3" }); datas.Add( new ArbitragePath { Id = 0, Created = DateTime.UtcNow, Path = "Pair 1,Pair 3,Pair 4" }); var addedEntites = _repo.AddAll(datas).Result; }
/// <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(); }
/// <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(); }
public ArbitragePathBuilder(IArbitragePathRepository repo) { this._apRepo = repo; }
public ArbitrageBuilder(IArbitragePathRepository arbitragePathRepository) { this._arbitragePathRepo = arbitragePathRepository; }