Пример #1
0
        public async Task InternalDbSeedBooks_Test()
        {
            DbContext.Books.RemoveRange(DbContext.Books.AsEnumerable());
            await DbContext.SaveChangesAsync();

            await InternalDbService.SeedBooks(DbContext);

            Assert.IsTrue(DbContext.Books.Count() == 2);
        }
Пример #2
0
        public async Task LoadBooks_Test()
        {
            DbContext.Books.RemoveRange(DbContext.Books.AsEnumerable());
            await DbContext.SaveChangesAsync();

            await InternalDbService.SeedBooks(DbContext);

            var internalDbService = new InternalDbService();

            var bookList = await internalDbService.LoadBooks();

            Assert.IsTrue(bookList.Count() == 2);
        }