@MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_KEYS}) public void testPut_nullKeySupportedNotPresent() { assertNull("put(null, value) should return null", put(nullKeyEntry)); expectAdded(nullKeyEntry); }
@MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_VALUES}) public void testPut_nullValueSupported() { assertNull("put(key, null) should return null", put(nullValueEntry)); expectAdded(nullValueEntry); }
@MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_KEYS, ALLOWS_NULL_VALUES}) public void testPut_nullKeyAndValueSupported() { assertNull("put(null, null) should return null", put(nullKeyValueEntry)); expectAdded(nullKeyValueEntry); }
@MapFeature.Require(SUPPORTS_PUT) public void testPut_supportedNotPresent() { assertNull("put(notPresent, value) should return null", put(e3())); expectAdded(e3()); }
@MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_VALUES}) @CollectionSize.Require(absent = ZERO) public void testPut_replaceNullValueWithNullSupported() { initMapWithNullValue(); assertNull( "put(present, null) should return the associated value (null)", getMap().put(getKeyForNullValue(), null)); expectContents(createArrayWithNullValue()); }
@MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_VALUES}) @CollectionSize.Require(absent = ZERO) public void testPut_replaceNullValueWithNonNullSupported() { Entry<K, V> newEntry = entry(getKeyForNullValue(), v3()); initMapWithNullValue(); assertNull("put(present, value) should return the associated value (null)", put(newEntry)); Entry<K, V>[] expected = createArrayWithNullValue(); expected[getNullLocation()] = newEntry; expectContents(expected); }
@MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_KEYS, ALLOWS_NULL_VALUES}) public void testPut_nullKeyAndValueSupported() { assertNull("put(null, null) should return null", put(nullKeyValueEntry)); expectAdded(nullKeyValueEntry); }
@MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_KEYS}) public void testPut_nullKeySupportedNotPresent() { assertNull("put(null, value) should return null", put(nullKeyEntry)); expectAdded(nullKeyEntry); }
@MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_KEYS}) public void testPut_nullKeySupportedNotPresent() { assertNull("put(null, value) should return null", put(nullKeyEntry)); expectAdded(nullKeyEntry); }
@MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_VALUES}) public void testPut_nullValueSupported() { assertNull("put(key, null) should return null", put(nullValueEntry)); expectAdded(nullValueEntry); }
@MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_VALUES}) public void testPut_nullValueSupported() { assertNull("put(key, null) should return null", put(nullValueEntry)); expectAdded(nullValueEntry); }
@MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_KEYS, ALLOWS_NULL_VALUES}) public void testPut_nullKeyAndValueSupported() { assertNull("put(null, null) should return null", put(nullKeyValueEntry)); expectAdded(nullKeyValueEntry); }
@MapFeature.Require(SUPPORTS_PUT) public void testPut_supportedNotPresent() { assertNull("put(notPresent, value) should return null", put(samples.e3)); expectAdded(samples.e3); }
@MapFeature.Require(SUPPORTS_PUT) public void testPut_supportedNotPresent() { assertNull("put(notPresent, value) should return null", put(e3())); expectAdded(e3()); }
@MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_VALUES}) @CollectionSize.Require(absent = ZERO) public void testPut_replaceNullValueWithNullSupported() { initMapWithNullValue(); assertNull( "put(present, null) should return the associated value (null)", getMap().put(getKeyForNullValue(), null)); expectContents(createArrayWithNullValue()); }
@MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_VALUES}) @CollectionSize.Require(absent = ZERO) public void testPut_replaceNullValueWithNullSupported() { initMapWithNullValue(); assertNull("put(present, null) should return the associated value (null)", getMap().put(getKeyForNullValue(), null)); expectContents(createArrayWithNullValue()); }
@MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_VALUES}) @CollectionSize.Require(absent = ZERO) public void testPut_replaceNullValueWithNonNullSupported() { Entry<K, V> newEntry = entry(getKeyForNullValue(), samples.e3.getValue()); initMapWithNullValue(); assertNull("put(present, value) should return the associated value (null)", put(newEntry)); Entry<K, V>[] expected = createArrayWithNullValue(); expected[getNullLocation()] = newEntry; expectContents(expected); }
@MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_VALUES}) @CollectionSize.Require(absent = ZERO) public void testPut_replaceNullValueWithNonNullSupported() { Entry<K, V> newEntry = entry(getKeyForNullValue(), v3()); initMapWithNullValue(); assertNull("put(present, value) should return the associated value (null)", put(newEntry)); Entry<K, V>[] expected = createArrayWithNullValue(); expected[getNullLocation()] = newEntry; expectContents(expected); }