Exemplo n.º 1
0
        public async Task UpdateAutoWithOptimisticConcurrencyTest()
        {
            var auto = await _target.GetByIdAsync(new GetAutoByIdRequest { Id = 1 });

            var auto2 = auto;

            auto.Tagestarif  = 100;
            auto2.Tagestarif = 200;

            await _target.UpdateAsync(auto);

            Assert.Throws <RpcException>(() => _target.Update(auto2));
        }