public virtual void AssertQueryEquals(Lucene.Net.QueryParsers.QueryParser qp, System.String field, System.String query, System.String result) { Query q = qp.Parse(query); System.String s = q.ToString(field); if (!s.Equals(result)) { Assert.Fail("Query /" + query + "/ yielded /" + s + "/, expecting /" + result + "/"); } }