2021222324252627
new StringEqualsIgnoreCase("a").accept(null); } @Test(expected = ClassCastException.class) public void passingNonStringToErasureYieldsException() { Predicate p = new StringEqualsIgnoreCase("a"); p.accept(new Object()); }
new StringEndsWith("a").accept(null); } @Test(expected = ClassCastException.class) public void passingNonStringToErasureYieldsException() { Predicate p = new StringEndsWith("a"); p.accept(new Object()); }
new StringContains("a").accept(null); } @Test(expected = ClassCastException.class) public void passingNonStringToErasureYieldsException() { Predicate p = new StringContains("a"); p.accept(new Object()); }
new StringEndsWithIgnoreCase("a").accept(null); } @Test(expected = ClassCastException.class) public void passingNonStringToErasureYieldsException() { Predicate p = new StringEndsWithIgnoreCase("a"); p.accept(new Object()); }
new StringStartsWith("a").accept(null); } @Test(expected = ClassCastException.class) public void passingNonStringToErasureYieldsException() { Predicate p = new StringStartsWith("a"); p.accept(new Object()); }
new StringStartsWithIgnoreCase("a").accept(null); } @Test(expected = ClassCastException.class) public void passingNonStringToErasureYieldsException() { Predicate p = new StringStartsWithIgnoreCase("a"); p.accept(new Object()); }
new StringContainsIgnoreCase("a").accept(null); } @Test(expected=ClassCastException.class) public void passingNonStringToErasureYieldsException(){ Predicate p = new StringContainsIgnoreCase("a"); p.accept(new Object()); }