Package no.priv.garshol.duke

Examples of no.priv.garshol.duke.Record


    source.addColumn(new Column("NAME", "GIVENNAME", null, cleaner));
       
    RecordIterator it = source.getRecords();
    assertTrue(it.hasNext());

    Record r = it.next();
    assertEquals("1", r.getValue("ID"));
    assertEquals(null, r.getValue("GIVENNAME"));

    assertFalse(it.hasNext());
  }
View Full Code Here


    source.addColumn(col);
       
    RecordIterator it = source.getRecords();
    assertTrue(it.hasNext());

    Record r = it.next();
    assertEquals("1", r.getValue("ID"));
    Collection<String> values = r.getValues("NAME");
    assertEquals(3, values.size());
    assertTrue(values.contains("foo"));
    assertTrue(values.contains("bar"));
    assertTrue(values.contains("baz"));
View Full Code Here

    List<TestUtils.Pair> matches = listener.getMatches();
    assertEquals("bad number of matches", 1, matches.size());

    TestUtils.Pair pair = matches.get(0);
    if (pair.r1.getValue("ID").equals("2")) {
      Record r = pair.r1;
      pair.r1 = pair.r2;
      pair.r2 = r;
    }

    assertEquals("1", pair.r1.getValue("ID"));
View Full Code Here

    assertEquals("bad number of matches", 1, matches.size());
    assertEquals("bad number of missed matches", 1, listener.getNoMatchCount());

    TestUtils.Pair pair = matches.get(0);
    if (pair.r1.getValue("ID").equals("2")) {
      Record r = pair.r1;
      pair.r1 = pair.r2;
      pair.r2 = r;
    }

    assertEquals("1", pair.r1.getValue("ID"));
View Full Code Here

    assertEquals("bad number of matches", 1, matches.size());
    assertEquals("bad number of missed matches", 1, listener.getNoMatchCount());

    TestUtils.Pair pair = matches.get(0);
    if (pair.r1.getValue("ID").equals("2")) {
      Record r = pair.r1;
      pair.r1 = pair.r2;
      pair.r2 = r;
    }

    assertEquals("1", pair.r1.getValue("ID"));
View Full Code Here

    assertTrue(linkdb.getAllLinks().isEmpty());
  }

  @Test
  public void testEmptyRecord() {
    Record r1 = makeRecord();
    Record r2 = makeRecord("id", "2");

    try {
      listener.startProcessing();
      listener.batchReady(1);
      listener.matches(r1, r2, 1.0);
View Full Code Here

    }
  }

  @Test
  public void testSingleRecord() {
    Record r1 = makeRecord("id", "1");
    Record r2 = makeRecord("id", "2");

    listener.startProcessing();
    listener.batchReady(1);
    listener.matches(r1, r2, 0.95);
    listener.batchDone();
View Full Code Here

  @Test
  public void testSingleRecordRetract() {
    testSingleRecord(); // now we've asserted they're equal. then let's retract
    pause(); // ensure timestamps are different

    Record r1 = makeRecord("id", "1");

    listener.startProcessing();
    listener.batchReady(0);
    listener.noMatchFor(r1);
    listener.batchDone();
View Full Code Here

               all.iterator().next());
  }

  @Test
  public void testSingleRecordPerhaps() {
    Record r1 = makeRecord("id", "1");
    Record r2 = makeRecord("id", "2");

    listener.startProcessing();
    listener.batchReady(1);
    listener.matchesPerhaps(r1, r2, 0.7);
    listener.batchDone();
View Full Code Here

  @Test
  public void testUpgradeFromPerhaps() {
    testSingleRecordPerhaps();
    pause(); // ensure timestamps are different

    Record r1 = makeRecord("id", "1");
    Record r2 = makeRecord("id", "2");

    listener.startProcessing();
    listener.batchReady(1);
    listener.matches(r1, r2, 1.0);
    listener.batchDone();
View Full Code Here

TOP

Related Classes of no.priv.garshol.duke.Record

Copyright © 2018 www.massapicom. 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.