Description
@Test public void testNameSetContains() { final NameSet names = new NameSet(); names.add("COUNT"); names.add("COVAR_POP"); assertThat(names.contains("count", true), is(false)); assertNsContains(names, "count", false, true); } private void assertNsContains(NameSet names, String item, boolean caseSensitive, boolean result) { assertEquals(names + ", contains(" + item + (caseSensitive ? ", caseSensitive" : "") + ")", result, names.contains(item, caseSensitive)); }
Output
java.lang.AssertionError: [COUNT, COVAR_POP], contains(count) Expected :true Actual :false