Exemplo n.º 1
0
        public void TestDataBulkDelete()
        {
            using (var context = new InsuranceDataContext())
            {
                var repository = new InsuranceRepository(context);

                var originalCount = repository.GetItems<t00001_event_loss_footprint>().Count();
                var records = repository.GetItems<t00001_event_loss_footprint>().Take(11);

                Assert.True(records.Any() && records.Count() == 11);

                var recordList = records.ToList();
                repository.DeleteItems(recordList);
                repository.Save();

                var newCount = repository.GetItems<t00001_event_loss_footprint>().Count();

                Assert.AreEqual(originalCount - 11, newCount);
            }
        }