Exemplo n.º 1
0
        public void Removes_Range_From_List_But_Not_Store()
        {
            _biggyMemoryList = new BiggyList <Widget>(_widgetStore, inMemory: true);

            // Grab a range of items to remove:
            var itemsToRemove = _biggyMemoryList.Where(w => w.Price > 5 && w.Price <= 20);
            int removedQty    = itemsToRemove.Count();

            _biggyMemoryList.Remove(itemsToRemove.ToList());

            var storeWidgets = _widgetStore.Load();

            Assert.True(_biggyMemoryList.Count() < storeWidgets.Count());
        }
Exemplo n.º 2
0
        public void Removes_Range_From_List_But_Not_Store()
        {
            _biggyMemoryList = new BiggyList<Widget>(_widgetStore, inMemory: true);

              // Grab a range of items to remove:
              var itemsToRemove = _biggyMemoryList.Where(w => w.Price > 5 && w.Price <= 20);
              int removedQty = itemsToRemove.Count();

              _biggyMemoryList.Remove(itemsToRemove.ToList());

              var storeWidgets = _widgetStore.Load();
              Assert.True(_biggyMemoryList.Count() < storeWidgets.Count());
        }