@ListFeature.Require(SUPPORTS_SET) public void testSet_indexTooLow() { try { getList().set(-1, e3()); fail("set(-1) should throw IndexOutOfBoundsException"); } catch (IndexOutOfBoundsException expected) { } expectUnchanged(); }
@CollectionSize.Require(ZERO) @ListFeature.Require(absent = SUPPORTS_SET) public void testSet_unsupportedByEmptyList() { try { getList().set(0, e3()); fail("set() should throw UnsupportedOperationException or IndexOutOfBoundsException"); } catch (UnsupportedOperationException | IndexOutOfBoundsException tolerated) { } expectUnchanged(); }
@ListFeature.Require(SUPPORTS_SET) public void testSet_indexTooHigh() { int index = getNumElements(); try { getList().set(index, e3()); fail("set(size) should throw IndexOutOfBoundsException"); } catch (IndexOutOfBoundsException expected) { } expectUnchanged(); }
@CollectionSize.Require(absent = ZERO) @ListFeature.Require(absent = SUPPORTS_SET) public void testSet_unsupported() { try { getList().set(aValidIndex(), e3()); fail("set() should throw UnsupportedOperationException"); } catch (UnsupportedOperationException expected) { } expectUnchanged(); }
@CollectionSize.Require(absent = ZERO) @ListFeature.Require(SUPPORTS_SET) @CollectionFeature.Require(absent = ALLOWS_NULL_VALUES) public void testSet_nullUnsupported() { try { getList().set(aValidIndex(), null); fail("set(null) should throw NullPointerException"); } catch (NullPointerException expected) { } expectUnchanged(); }
@ListFeature.Require(SUPPORTS_SET) public void testSet_indexTooLow() { try { getList().set(-1, samples.e3); fail("set(-1) should throw IndexOutOfBoundsException"); } catch (IndexOutOfBoundsException expected) { } expectUnchanged(); }
@ListFeature.Require(SUPPORTS_SET) public void testSet_indexTooLow() { try { getList().set(-1, e3()); fail("set(-1) should throw IndexOutOfBoundsException"); } catch (IndexOutOfBoundsException expected) { } expectUnchanged(); }
@CollectionSize.Require(ZERO) @ListFeature.Require(absent = SUPPORTS_SET) public void testSet_unsupportedByEmptyList() { try { getList().set(0, samples.e3); fail("set() should throw UnsupportedOperationException " + "or IndexOutOfBoundsException"); } catch (UnsupportedOperationException tolerated) { } catch (IndexOutOfBoundsException tolerated) { } expectUnchanged(); }
@ListFeature.Require(SUPPORTS_SET) public void testSet_indexTooHigh() { int index = getNumElements(); try { getList().set(index, samples.e3); fail("set(size) should throw IndexOutOfBoundsException"); } catch (IndexOutOfBoundsException expected) { } expectUnchanged(); }
@CollectionSize.Require(ZERO) @ListFeature.Require(absent = SUPPORTS_SET) public void testSet_unsupportedByEmptyList() { try { getList().set(0, e3()); fail("set() should throw UnsupportedOperationException or IndexOutOfBoundsException"); } catch (UnsupportedOperationException | IndexOutOfBoundsException tolerated) { } expectUnchanged(); }
@ListFeature.Require(SUPPORTS_SET) public void testSet_indexTooHigh() { int index = getNumElements(); try { getList().set(index, e3()); fail("set(size) should throw IndexOutOfBoundsException"); } catch (IndexOutOfBoundsException expected) { } expectUnchanged(); }
@CollectionSize.Require(absent = ZERO) @ListFeature.Require(absent = SUPPORTS_SET) public void testSet_unsupported() { try { getList().set(aValidIndex(), samples.e3); fail("set() should throw UnsupportedOperationException"); } catch (UnsupportedOperationException expected) { } expectUnchanged(); }
@CollectionSize.Require(absent = ZERO) @ListFeature.Require(absent = SUPPORTS_SET) public void testSet_unsupported() { try { getList().set(aValidIndex(), e3()); fail("set() should throw UnsupportedOperationException"); } catch (UnsupportedOperationException expected) { } expectUnchanged(); }
@CollectionSize.Require(absent = ZERO) @ListFeature.Require(SUPPORTS_SET) @CollectionFeature.Require(absent = ALLOWS_NULL_VALUES) public void testSet_nullUnsupported() { try { getList().set(aValidIndex(), null); fail("set(null) should throw NullPointerException"); } catch (NullPointerException expected) { } expectUnchanged(); }
@CollectionSize.Require(absent = ZERO) @ListFeature.Require(SUPPORTS_SET) @CollectionFeature.Require(absent = ALLOWS_NULL_VALUES) public void testSet_nullUnsupported() { try { getList().set(aValidIndex(), null); fail("set(null) should throw NullPointerException"); } catch (NullPointerException expected) { } expectUnchanged(); }