예제 #1
0
        public CoinRepositoryTests()
        {
            _repo = new CoinRepository();

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

            // then add some data for testing
            datas.Add(
                new Coin
            {
                Id         = 0,
                AverageBuy = 5301.23M,
                CurrencyId = 1,
                Quantity   = 0.44M
            });
            datas.Add(
                new Coin
            {
                Id         = 0,
                AverageBuy = 0.045M,
                CurrencyId = 2,
                Quantity   = 4.25M
            });

            var addedEntites = _repo.AddAll(datas).Result;
        }
        public WatcherRepositoryTests()
        {
            _repo = new WatcherRepository();

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

            // then add some data for testing
            datas.Add(
                new Watcher
            {
                CurrencyId = 1,
                DateAdded  = DateTime.UtcNow,
                Enabled    = true,
                Exchange   = Business.Entities.Exchange.Binance,
                Pair       = "BTCUSDT",
                WatchHit   = null,
                WatchPrice = 3678.00M
            });
            datas.Add(
                new Watcher
            {
                CurrencyId = 2,
                DateAdded  = DateTime.UtcNow.AddMonths(-2),
                Enabled    = true,
                Exchange   = Business.Entities.Exchange.Binance,
                Pair       = "ETHBTC",
                WatchHit   = DateTime.UtcNow.AddDays(-2),
                WatchPrice = 0.0201M
            });

            var addedEntites = _repo.AddAll(datas).Result;
        }