コード例 #1
0
  public void testReturnBest() throws Exception {
    System.gc();
    BestQueryExplainer bq = new BestQueryExplainer();
    bq.add(q1);
    bq.add(q2);
    assertEquals(q1, bq.getBestQuery());

    bq = new BestQueryExplainer();
    bq.add(q2);
    bq.add(q1);
    assertEquals(q1, bq.getBestQuery());
  }
コード例 #2
0
 public void testNullBestQueryForNoneAdded() throws Exception {
   BestQueryExplainer bq = new BestQueryExplainer();
   assertNull(bq.getBestQuery());
   assertNull(bq.getBestQueryString());
   assertNull(bq.getBestExplainResult());
 }