323334353637383940
public class SearchStringTest { public void main_param() { SearchString s = new SearchString("abc"); Param p = s.param(); assertThat(p.toString(), equalTo("abc")); }
404142434445464748
} public void main_param_trim() { SearchString s = new SearchString(" abc "); Param p = s.param(); assertThat(p.toString(), equalTo("abc")); }
4849505152535455565758
} public void var_param() { SearchString s = new SearchString("abc var:xyz"); Param p = s.param(); Param var = s.param("var"); assertThat(p.toString(), equalTo("abc")); assertThat(var.toString(), equalTo("xyz")); }
585960616263646566676869
} public void var_param_empty() { SearchString s = new SearchString("abc var:"); Param p = s.param(); Param var = s.param("var"); assertThat(p.toString(), equalTo("abc")); assertTrue(var.isEmpty()); assertThat(var.toString(), equalTo("")); }