Esempio n. 1
0
        public void When_resetting_a_connection_that_exists()
        {
            var connectionFactory = new ConnectionFactory {
                HostName = "localhost"
            };

            _connectionPool.ResetConnection(connectionFactory);

            _connectionPool.GetConnection(connectionFactory).Should().NotBeSameAs(_originalConnection);
        }
        public void When_resetting_a_connection_that_does_not_exist()
        {
            var connectionFactory = new ConnectionFactory {
                HostName = "invalidhost"
            };

            Action resetConnection = () => _connectionPool.ResetConnection(connectionFactory);

            resetConnection.Should().NotThrow();
        }