Exemple #1
0
  public void testSetters() {
    QueryElement q = new QueryElement("role", "value");

    assertEquals("role", q.getRole());
    q.setRole("newRole");
    assertEquals("newRole", q.getRole());
    q.setRole(null);
    assertEquals("UNKNOWN", q.getRole());

    assertEquals("value", q.getValue());
    q.setValue("newValue");
    assertEquals("newValue", q.getValue());
    q.setValue(null);
    assertEquals("UNKNOWN", q.getValue());
  }
Exemple #2
0
 public void testCtor() {
   QueryElement full = new QueryElement("role", "value");
   assertEquals("role", full.getRole());
   assertEquals("value", full.getValue());
 }
Exemple #3
0
 public void testNoArgsCtor() {
   QueryElement blank = new QueryElement();
   assertEquals("UNKNOWN", blank.getRole());
   assertEquals("UNKNOWN", blank.getValue());
 }