@Test public void testQueryPart() { QueryPart part = new QueryPart("column", "search"); assertEquals("column", part.getColumnName()); assertEquals("search", part.getSearchString()); assertEquals("column=search", part.toString()); assertThrows(NullPointerException.class, () -> new QueryPart(null, "search")); part = new QueryPart("column", null); assertEquals("", part.getSearchString()); }
public QueryPart(String spaltenName, String suchString) { if (spaltenName == null) { throw new NullPointerException(); } if (suchString == null) { suchString = ""; } columnName = spaltenName; searchString = suchString; }
QueryPart { public QueryPart(String spaltenName, String suchString) { if (spaltenName == null) { throw new NullPointerException(); } if (suchString == null) { suchString = ""; } columnName = spaltenName; searchString = suchString; } }
QueryPart { public QueryPart(String spaltenName, String suchString) { if (spaltenName == null) { throw new NullPointerException(); } if (suchString == null) { suchString = ""; } columnName = spaltenName; searchString = suchString; } QueryPart(String spaltenName, String suchString); }
QueryPart { public QueryPart(String spaltenName, String suchString) { if (spaltenName == null) { throw new NullPointerException(); } if (suchString == null) { suchString = ""; } columnName = spaltenName; searchString = suchString; } QueryPart(String spaltenName, String suchString); String getColumnName(); String getSearchString(); @Override String toString(); }
QueryPart { public QueryPart(String spaltenName, String suchString) { if (spaltenName == null) { throw new NullPointerException(); } if (suchString == null) { suchString = ""; } columnName = spaltenName; searchString = suchString; } QueryPart(String spaltenName, String suchString); String getColumnName(); String getSearchString(); @Override String toString();  }