public virtual void TestException() { try { BooleanQuery.MaxClauseCount = 0; Assert.Fail(); } catch (System.ArgumentException e) { // okay } }