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()); }
public void testCtor() { QueryElement full = new QueryElement("role", "value"); assertEquals("role", full.getRole()); assertEquals("value", full.getValue()); }
public void testNoArgsCtor() { QueryElement blank = new QueryElement(); assertEquals("UNKNOWN", blank.getRole()); assertEquals("UNKNOWN", blank.getValue()); }