public ExchangeApiRepositoryTests()
        {
            _repo = new ExchangeApiRepository();

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

            // then add some data for testing
            datas.Add(
                new ExchangeApi
            {
                Id         = 0,
                ApiKey     = "12345",
                ApiKeyName = "Test Key 1",
                ApiSecret  = "a secret",
                Created    = DateTime.UtcNow,
                Exchange   = Business.Entities.Exchange.Binance
            });
            datas.Add(
                new ExchangeApi
            {
                Id         = 0,
                ApiKey     = "678910",
                ApiKeyName = "Test Key 2",
                ApiSecret  = "a secret",
                Created    = DateTime.UtcNow,
                Exchange   = Business.Entities.Exchange.Bittrex
            });

            var addedEntites = _repo.AddAll(datas).Result;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="exhangeApiRepo">Exchange Api repository</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 ExchangeApiBuilder(IExchangeApiRepository exhangeApiRepo)
 {
     _exchangeApiRepo = exhangeApiRepo;
 }