Example #1
0
        public void DeleteAll_Test()
        {
            var entityList = _repo.Get().Result;

            Assert.NotEmpty(entityList);

            var delete            = _repo.DeleteAll().Result;
            var entityListRecheck = _repo.Get().Result;

            Assert.True(delete);
            Assert.Empty(entityListRecheck);
        }
Example #2
0
        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;
        }