Save() public method

public Save ( IEnumerable items ) : void
items IEnumerable
return void
        public void ItemStorage_Can_Save_5_Modified_Items_And_Retrieve_Them_Back()
        {
            this.Items.InsertBatch(BuildItems(count: 5));

            var items = this.Items.AsQueryable().ToList();
            foreach (var item in items)
            {
                item.Tags = new[] { "test" };
            }

            var storage = new StreamStorage(ConnectionString, DatabaseName);

            storage.Save(items);

            var savedItems = this.Items.AsQueryable().ToList();

            foreach (var item in savedItems)
            {
                Assert.IsTrue(item.Tags.Contains("test"));
            }
        }
        public void ItemStorage_Can_Save_5_New_And_5_Modified_Items()
        {
            this.Items.InsertBatch(BuildItems(count: 5));

            var existingItems = this.Items.AsQueryable().ToList();
            foreach (var item in existingItems)
            {
                item.Tags = new[] { "test" };
            }

            var newItems = BuildItems(count: 5);
            var items = existingItems.Union(newItems).ToList();

            var storage = new StreamStorage(ConnectionString, DatabaseName);

            storage.Save(items);

            var savedItems = this.Items.AsQueryable().ToList();

            Assert.That(items.Count(), Is.EqualTo(savedItems.Count));
        }
        public void ItemStorage_Can_Save_10_New_Items()
        {
            var items = BuildItems(count: 10);

            var storage = new StreamStorage(ConnectionString, DatabaseName);

            storage.Save(items);

            var savedItems = this.Items.AsQueryable().ToList();

            Assert.That(items.Count, Is.EqualTo(savedItems.Count));
        }