Exemple #1
0
        public async Task ActDefer_success()
        {
            var map = new MapItem <TestItem, int>("Id", x => x.ItemId)
            {
                ActDefer = async(cache, x, y) => await Task.Run(() => x.ItemId = y).ConfigureAwait(false)
            };

            var item = new TestItem();
            await map.Defer(null, item, 3).ConfigureAwait(false);

            Assert.That(item.ItemId, Is.EqualTo(3));
        }