Example #1
0
        public ExchangeCoinRepositoryTests()
        {
            _repo = new ExchangeCoinRepository();

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

            // then add some data for testing
            datas.Add(
                new ExchangeCoin
            {
                AverageBuy = 6700.13M,
                CurrencyId = 1,
                Exchange   = Business.Entities.Exchange.Binance,
                Quantity   = 0.24M
            });
            datas.Add(
                new ExchangeCoin
            {
                AverageBuy = 0.024M,
                CurrencyId = 2,
                Exchange   = Business.Entities.Exchange.Binance,
                Quantity   = 7.25M
            });

            var addedEntites = _repo.AddAll(datas).Result;
        }
 public ExchangeCoinBuilder(ICoinBuyBuilder coinBuyBuilder,
                            IExchangeOrderBuilder eoBldr,
                            IExchangeHubBuilder hubBuilder,
                            IExchangeCoinRepository repo)
 {
     this._cbBldr  = coinBuyBuilder;
     this._eoBldr  = eoBldr;
     this._hubBldr = hubBuilder;
     this._ecRepo  = repo;
 }