Exemplo n.º 1
0
        public void ReusesStandaloneConnectionOnMulti()
        {
            var connection = ExclusivePoolSetup();

            _channel.Execute(@"
                        MULTI
                        INCR X");

            _channel.Execute(@"
                        INCR X");

            _channel.Execute(@"
                        INCR X
                        EXEC");

            connection.Verify(x => x.Execute(It.IsAny <ExecutionToken>(), It.IsAny <CancellationToken>()), Times.Exactly(3));
            connection.Verify(x => x.Dispose(), Times.Once);
        }