Package edu.buffalo.cse.ir.wikiindexer.indexer

Examples of edu.buffalo.cse.ir.wikiindexer.indexer.LocalDictionary.lookup()


    // test that it creates entries
    INDEXFIELD testarr[] = INDEXFIELD.values();

    for (INDEXFIELD fld : testarr) {
      LocalDictionary dict = new LocalDictionary(idxProps, fld);
      int retVal = dict.lookup("test");
      assertTrue(retVal > 0);

      // test same return value
      assertEquals(retVal, dict.lookup("test"));
View Full Code Here


      LocalDictionary dict = new LocalDictionary(idxProps, fld);
      int retVal = dict.lookup("test");
      assertTrue(retVal > 0);

      // test same return value
      assertEquals(retVal, dict.lookup("test"));

      // test different values
      assertNotEquals(retVal, dict.lookup("tests"));

      // test case sensitivity
View Full Code Here

      // test same return value
      assertEquals(retVal, dict.lookup("test"));

      // test different values
      assertNotEquals(retVal, dict.lookup("tests"));

      // test case sensitivity
      assertNotEquals(retVal, dict.lookup("Test"));
      assertNotEquals(retVal, dict.lookup("tEst"));
      assertNotEquals(retVal, dict.lookup("TEST"));
View Full Code Here

      // test different values
      assertNotEquals(retVal, dict.lookup("tests"));

      // test case sensitivity
      assertNotEquals(retVal, dict.lookup("Test"));
      assertNotEquals(retVal, dict.lookup("tEst"));
      assertNotEquals(retVal, dict.lookup("TEST"));
     
      dict = null;
    }
View Full Code Here

      // test different values
      assertNotEquals(retVal, dict.lookup("tests"));

      // test case sensitivity
      assertNotEquals(retVal, dict.lookup("Test"));
      assertNotEquals(retVal, dict.lookup("tEst"));
      assertNotEquals(retVal, dict.lookup("TEST"));
     
      dict = null;
    }
  }
View Full Code Here

      assertNotEquals(retVal, dict.lookup("tests"));

      // test case sensitivity
      assertNotEquals(retVal, dict.lookup("Test"));
      assertNotEquals(retVal, dict.lookup("tEst"));
      assertNotEquals(retVal, dict.lookup("TEST"));
     
      dict = null;
    }
  }
View Full Code Here

     
      //test with empty
      assertFalse(dict.exists("test"));
     
      //assert after addition
      dict.lookup("test");
      assertTrue(dict.exists("test"));

      // test with different values
      assertFalse(dict.exists("tests"));
View Full Code Here

     
      //pre-populate with known terms
      String[] myterms = {"test","best","crest","zest","testy","tether","temper", "teat","tempest"};
     
      for (String term : myterms) {
        dict.lookup(term);
      }
     
      //exact match
      assertArrayEquals(new Object[] {"test"}, getSortedArray(dict.query("test")));
     
View Full Code Here

      assertEquals(0, dict.getTotalTerms());
     
     
      //large loop addition
      for (int i = 0; i < 1000; i++) {
        dict.lookup("test"+i);
        assertEquals(i+1, dict.getTotalTerms());
      }
     
      //size with no new elements added
      dict.lookup("test500");
View Full Code Here

        dict.lookup("test"+i);
        assertEquals(i+1, dict.getTotalTerms());
      }
     
      //size with no new elements added
      dict.lookup("test500");
      assertEquals(1000, dict.getTotalTerms());
     
      dict = null;
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.