public void testFind_wrongType() { try { assertEquals( getMethodName() + "(wrongType) should return -1 or throw", -1, find(WrongType.VALUE)); } catch (ClassCastException tolerated) { } } }
@CollectionSize.Require(absent = ZERO) public void testFind_yes() { assertEquals( getMethodName() + "(firstElement) should return 0", 0, find(getOrderedElements().get(0))); }
@CollectionFeature.Require(absent = ALLOWS_NULL_VALUES) public void testFind_nullNotContainedAndUnsupported() { try { assertEquals(getMethodName() + "(nullNotPresent) should return -1 or throw", -1, find(null)); } catch (NullPointerException tolerated) { } }
@CollectionFeature.Require(ALLOWS_NULL_VALUES) public void testFind_nullNotContainedButSupported() { assertEquals(getMethodName() + "(nullNotPresent) should return -1", -1, find(null)); }
public void testFind_no() { assertEquals(getMethodName() + "(notPresent) should return -1", -1, find(e3())); }
@CollectionFeature.Require(ALLOWS_NULL_VALUES) @CollectionSize.Require(absent = ZERO) public void testFind_nonNullWhenNullContained() { initCollectionWithNullElement(); assertEquals(getMethodName() + "(notPresent) should return -1", -1, find(e3())); }
@CollectionFeature.Require(ALLOWS_NULL_VALUES) @CollectionSize.Require(absent = ZERO) public void testFind_nullContained() { initCollectionWithNullElement(); assertEquals( getMethodName() + "(null) should return " + getNullLocation(), getNullLocation(), find(null)); }
public void testFind_wrongType() { try { assertEquals( getMethodName() + "(wrongType) should return -1 or throw", -1, find(WrongType.VALUE)); } catch (ClassCastException tolerated) { } } }
public void testFind_wrongType() { try { assertEquals(getMethodName() + "(wrongType) should return -1 or throw", -1, find(WrongType.VALUE)); } catch (ClassCastException tolerated) { } } }
public void testFind_no() { assertEquals(getMethodName() + "(notPresent) should return -1", -1, find(samples.e3)); }
@CollectionSize.Require(absent = ZERO) public void testFind_yes() { assertEquals( getMethodName() + "(firstElement) should return 0", 0, find(getOrderedElements().get(0))); }
@CollectionFeature.Require(absent = ALLOWS_NULL_VALUES) public void testFind_nullNotContainedAndUnsupported() { try { assertEquals(getMethodName() + "(nullNotPresent) should return -1 or throw", -1, find(null)); } catch (NullPointerException tolerated) { } }
@CollectionFeature.Require(ALLOWS_NULL_VALUES) public void testFind_nullNotContainedButSupported() { assertEquals(getMethodName() + "(nullNotPresent) should return -1", -1, find(null)); }
@CollectionSize.Require(absent = ZERO) public void testFind_yes() { assertEquals(getMethodName() + "(firstElement) should return 0", 0, find(getOrderedElements().get(0))); }
@CollectionFeature.Require(ALLOWS_NULL_VALUES) public void testFind_nullNotContainedButSupported() { assertEquals(getMethodName() + "(nullNotPresent) should return -1", -1, find(null)); }
@CollectionFeature.Require(absent = ALLOWS_NULL_VALUES) public void testFind_nullNotContainedAndUnsupported() { try { assertEquals( getMethodName() + "(nullNotPresent) should return -1 or throw", -1, find(null)); } catch (NullPointerException tolerated) { } }
@CollectionFeature.Require(ALLOWS_NULL_VALUES) @CollectionSize.Require(absent = ZERO) public void testFind_nonNullWhenNullContained() { initCollectionWithNullElement(); assertEquals(getMethodName() + "(notPresent) should return -1", -1, find(samples.e3)); }
@CollectionFeature.Require(ALLOWS_NULL_VALUES) @CollectionSize.Require(absent = ZERO) public void testFind_nonNullWhenNullContained() { initCollectionWithNullElement(); assertEquals(getMethodName() + "(notPresent) should return -1", -1, find(e3())); }
@CollectionFeature.Require(ALLOWS_NULL_VALUES) @CollectionSize.Require(absent = ZERO) public void testFind_nullContained() { initCollectionWithNullElement(); assertEquals( getMethodName() + "(null) should return " + getNullLocation(), getNullLocation(), find(null)); }
@CollectionFeature.Require(ALLOWS_NULL_VALUES) @CollectionSize.Require(absent = ZERO) public void testFind_nullContained() { initCollectionWithNullElement(); assertEquals(getMethodName() + "(null) should return " + getNullLocation(), getNullLocation(), find(null)); }