Esempio n. 1
0
        public void Can_call_single_operation_in_pipeline()
        {
            Assert.That(typedClient.GetValue(Key), Is.Null);

            using (var pipeline = typedClient.CreatePipeline())
            {
                pipeline.QueueCommand(r => r.SetEntry(Key, model));

                pipeline.Flush();
            }

            modelFactory.AssertIsEqual(typedClient.GetValue(Key), model);
        }
        public async Task Can_call_single_operation_in_pipeline()
        {
            Assert.That(await typedClient.GetValueAsync(Key), Is.Null);

            await using (var pipeline = typedClient.CreatePipeline())
            {
                pipeline.QueueCommand(r => r.SetValueAsync(Key, model));

                await pipeline.FlushAsync();
            }

            modelFactory.AssertIsEqual(await typedClient.GetValueAsync(Key), model);
        }
Esempio n. 3
0
        public void Can_call_single_operation_in_transaction()
        {
            Assert.That(typedClient.GetValue(Key), Is.Null);

            using (var trans = typedClient.CreateTransaction())
            {
                trans.QueueCommand(r => r.SetEntry(Key, model));

                trans.Commit();
            }

            modelFactory.AssertIsEqual(typedClient.GetValue(Key), model);
        }
Esempio n. 4
0
        public async Task Can_call_single_operation_in_transaction()
        {
            Assert.That(await typedClient.GetValueAsync(Key), Is.Null);

            await using (var trans = await typedClient.CreateTransactionAsync())
            {
                trans.QueueCommand(r => r.SetValueAsync(Key, model));

                await trans.CommitAsync();
            }

            modelFactory.AssertIsEqual(await typedClient.GetValueAsync(Key), model);
        }