Package no.priv.garshol.duke

Examples of no.priv.garshol.duke.Record


    source.setRows(new String[][] {{"http://a/1", "http://a/name", "1"}});
   
    RecordIterator it = source.getRecords();
    assertTrue("data source contains no records", it.hasNext());

    Record r = it.next();
    assertEquals("wrong ID", "http://a/1", r.getValue("ID"));
    assertEquals("wrong NAME", "1", r.getValue("NAME"));
    assertEquals("wrong AGE", null, r.getValue("AGE"));

    assertFalse("data source contains more than one record", it.hasNext());
    assertEquals("wrong number of pages", 2, source.getPages());
  }
View Full Code Here


        {"http://a/1", "http://a/age", "32"}});
   
    RecordIterator it = source.getRecords();
    assertTrue("data source contains no records", it.hasNext());

    Record r = it.next();
    assertEquals("wrong ID", "http://a/1", r.getValue("ID"));
    assertEquals("wrong NAME", "1", r.getValue("NAME"));
    assertEquals("wrong AGE", "32", r.getValue("AGE"));

    assertFalse("data source contains more than one record", it.hasNext());
    assertEquals("wrong number of pages", 2, source.getPages());
  }
View Full Code Here

        {"http://a/2", "http://a/age", "23"}});
   
    RecordIterator it = source.getRecords();
    assertTrue("data source contains no records", it.hasNext());

    Record r = it.next();
    assertEquals("wrong ID", "http://a/1", r.getValue("ID"));
    assertEquals("wrong NAME", "1", r.getValue("NAME"));
    assertEquals("wrong AGE", "32", r.getValue("AGE"));

    assertTrue("data source contains only one record", it.hasNext());

    r = it.next();
    assertEquals("wrong ID", "http://a/2", r.getValue("ID"));
    assertEquals("wrong NAME", "2", r.getValue("NAME"));
    assertEquals("wrong AGE", "23", r.getValue("AGE"));   
   
    assertFalse("data source contains more than two records", it.hasNext());
    assertEquals("wrong number of pages", 2, source.getPages());
  }
View Full Code Here

        {"http://a/2", "http://a/age", "23"}});
   
    RecordIterator it = source.getRecords();
    assertTrue("data source contains no records", it.hasNext());

    Record r = it.next();
    assertEquals("wrong ID", "http://a/1", r.getValue("ID"));   
    assertEquals("wrong AGE", "32", r.getValue("AGE"));

    Collection<String> values = r.getValues("NAME");
    assertEquals("wrong number of NAMEs", 2, values.size());
    assertTrue("NAMEs doesn't contain '1'", values.contains("1"));
    assertTrue("NAMEs doesn't contain 'one'", values.contains("one"));

    assertTrue("data source contains only one record", it.hasNext());

    r = it.next();
    assertEquals("wrong ID", "http://a/2", r.getValue("ID"));
    assertEquals("wrong NAME", "2", r.getValue("NAME"));
    assertEquals("wrong AGE", "23", r.getValue("AGE"));   
   
    assertFalse("data source contains more than two records", it.hasNext());
    assertEquals("wrong number of pages", 2, source.getPages());
  }
View Full Code Here

        {"http://a/1", "http://a/wtf", "whee"}});
   
    RecordIterator it = source.getRecords();
    assertTrue("data source contains no records", it.hasNext());

    Record r = it.next();
    assertEquals("wrong ID", "http://a/1", r.getValue("ID"));
    assertEquals("wrong NAME", "1", r.getValue("NAME"));
    assertEquals("wrong AGE", "32", r.getValue("AGE"));

    assertFalse("data source contains more than one record", it.hasNext());
    assertEquals("wrong number of pages", 2, source.getPages());
  }
View Full Code Here

        {"http://a/3", "http://a/age", "2323"}});
   
    RecordIterator it = source.getRecords();
    assertTrue("data source contains no records", it.hasNext());

    Record r = it.next();
    assertEquals("wrong ID", "http://a/1", r.getValue("ID"));
    assertEquals("wrong NAME", "1", r.getValue("NAME"));
    assertEquals("wrong AGE", "32", r.getValue("AGE"));

    assertTrue("data source contains only one record", it.hasNext());

    r = it.next();
    assertEquals("wrong ID", "http://a/2", r.getValue("ID"));
    assertEquals("wrong NAME", "2", r.getValue("NAME"));
    assertEquals("wrong AGE", "23", r.getValue("AGE"));   

    assertTrue("data source contains only two records", it.hasNext());

    r = it.next();
    assertEquals("wrong ID", "http://a/3", r.getValue("ID"));
    assertEquals("wrong NAME", "3", r.getValue("NAME"));
    assertEquals("wrong AGE", "2323", r.getValue("AGE"));   
   
    assertFalse("data source contains more than three records", it.hasNext());
    assertEquals("wrong number of pages", pages, source.getPages());
  }
View Full Code Here

        {"http://a/2", "http://a/age", "23"}});
   
    RecordIterator it = source.getRecords();
    assertTrue("data source contains no records", it.hasNext());

    Record r = it.next();
    assertEquals("wrong ID", "http://a/1", r.getValue("ID"));
    assertEquals("wrong NAME", "1", r.getValue("NAME"));
    assertEquals("wrong AGE", "32", r.getValue("AGE"));

    assertTrue("data source contains only one record", it.hasNext());

    r = it.next();
    assertEquals("wrong ID", "http://a/2", r.getValue("ID"));
    assertEquals("wrong NAME", "2", r.getValue("NAME"));
    assertEquals("wrong AGE", "23", r.getValue("AGE"));   
   
    assertFalse("data source contains more than two records", it.hasNext());
    assertEquals("wrong number of pages", 1, source.getPages());
  }
View Full Code Here

    source.setRows(new String[][] {{"http://a/1", "Peter", "15"}});
   
    RecordIterator it = source.getRecords();
    assertTrue("data source contains no records", it.hasNext());

    Record r = it.next();
    assertEquals("wrong ID", "http://a/1", r.getValue("ID"));
    assertEquals("wrong NAME", "Peter", r.getValue("NAME"));
    assertEquals("wrong AGE", "15", r.getValue("AGE"));

    assertFalse("data source contains more than one record", it.hasNext());
    assertEquals("wrong number of pages", 2, source.getPages());
  }
View Full Code Here

        {"http://a/2", "George", "151"}});
   
    RecordIterator it = source.getRecords();
    assertTrue("data source contains no records", it.hasNext());

    Record r = it.next();
    assertEquals("wrong ID", "http://a/1", r.getValue("ID"));
    assertEquals("wrong NAME", "Peter", r.getValue("NAME"));
    assertEquals("wrong AGE", "15", r.getValue("AGE"));

    assertTrue("data source contains only one record", it.hasNext());

    r = it.next();
    assertEquals("wrong ID", "http://a/2", r.getValue("ID"));
    assertEquals("wrong NAME", "George", r.getValue("NAME"));
    assertEquals("wrong AGE", "151", r.getValue("AGE"));   
   
    assertFalse("data source contains more than two records", it.hasNext());
    assertEquals("wrong number of pages", 2, source.getPages());
  }
View Full Code Here

    source.setRows(new String[][] {{"http://a/1", "Peter", "15", "ignore"}});
   
    RecordIterator it = source.getRecords();
    assertTrue("data source contains no records", it.hasNext());

    Record r = it.next();
    assertEquals("wrong ID", "http://a/1", r.getValue("ID"));
    assertEquals("wrong NAME", "Peter", r.getValue("NAME"));
    assertEquals("wrong AGE", "15", r.getValue("AGE"));

    assertFalse("data source contains more than one record", it.hasNext());
    assertEquals("wrong number of pages", 2, source.getPages());
  }
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.