/** * This method is exactly opposite (negated) of {@link #shouldContain(Object)}. * * @param expected value that is expected to be NOT contained in a tested object. */ public void shouldNotContain(Object expected) { if(contains(expected)) throw new TestException("tested object contains the value: " + expected + ", but it should not"); }
if(!contains(expected)) throw new TestException("tested value does not contain expected value: " + expected);
/** * This method is exactly opposite (negated) of {@link #shouldContain(Object)}. * * @param expected value that is expected to be NOT contained in a tested object. */ public void shouldNotContain(Object expected) { if(contains(expected)) throw new TestException("tested object contains the value: " + expected + ", but it should not"); }
/** * This method is exactly opposite (negated) of {@link #shouldContain(Object)}. * * @param expected value that is expected to be NOT contained in a tested object. */ public void shouldNotContain(Object expected) { if(contains(expected)) throw new TestException("tested object contains the value: " + expected + ", but it should not"); }
if(!contains(expected)) throw new TestException("tested value does not contain expected value: " + expected);
if(!contains(expected)) throw new TestException("tested value does not contain expected value: " + expected);