Npgsql.Tests.CommandTests.CloseConnectionWithException C# (CSharp) Method

CloseConnectionWithException() private method

private CloseConnectionWithException ( ) : void
return void
        public void CloseConnectionWithException()
        {
            using (var conn = OpenConnection())
            {
                using (var cmd = new NpgsqlCommand("SE", conn))
                    Assert.That(() => cmd.ExecuteReader(CommandBehavior.CloseConnection), Throws.Exception.TypeOf<PostgresException>());
                Assert.That(conn.State, Is.EqualTo(ConnectionState.Closed));
            }
        }