Skip to content

Commit

Permalink
Use JUnit Assumptions
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Mar 31, 2024
1 parent 70c708a commit cff3638
Showing 1 changed file with 7 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -768,9 +768,7 @@ public void testAsMapGet_Full() {

@Test
public void testAsMapRemove() {
if (!isRemoveSupported()) {
return;
}
assumeTrue(isRemoveSupported());
resetFull();
final Map<K, Collection<V>> mapCol = getMap().asMap();
final int maxK = getSampleKeySize();
Expand Down Expand Up @@ -995,9 +993,7 @@ public void testMapIterator() {

@Test
public void testMapIteratorRemove() {
if (!isRemoveSupported()) {
return;
}
assumeTrue(isRemoveSupported());
resetFull();
final MapIterator<K, V> mapIt = getMap().mapIterator();
while (mapIt.hasNext()) {
Expand Down Expand Up @@ -1183,9 +1179,7 @@ public void testRemove_KeyItem() {
@Test
@SuppressWarnings("unchecked")
public void testRemoveAllViaEntriesIterator() {
if (!isRemoveSupported()) {
return;
}
assumeTrue(isRemoveSupported());
final MultiValuedMap<K, V> map = makeFullMap();
for (final Iterator<?> i = map.entries().iterator(); i.hasNext();) {
i.next();
Expand All @@ -1198,9 +1192,7 @@ public void testRemoveAllViaEntriesIterator() {
@Test
@SuppressWarnings("unchecked")
public void testRemoveAllViaValuesIterator() {
if (!isRemoveSupported()) {
return;
}
assumeTrue(isRemoveSupported());
final MultiValuedMap<K, V> map = makeFullMap();
for (final Iterator<?> i = map.values().iterator(); i.hasNext();) {
i.next();
Expand All @@ -1212,9 +1204,7 @@ public void testRemoveAllViaValuesIterator() {

@Test
public void testRemoveMappingThroughGet() {
if (!isRemoveSupported()) {
return;
}
assumeTrue(isRemoveSupported());
resetFull();
final MultiValuedMap<K, V> map = getMap();
final int cpk = getSampleCountPerKey();
Expand Down Expand Up @@ -1249,9 +1239,7 @@ public void testRemoveMappingThroughGet() {

@Test
public void testRemoveMappingThroughGetIterator() {
if (!isRemoveSupported()) {
return;
}
assumeTrue(isRemoveSupported());
resetFull();
final MultiValuedMap<K, V> map = getMap();
@SuppressWarnings("unchecked")
Expand All @@ -1273,9 +1261,7 @@ public void testRemoveMappingThroughGetIterator() {

@Test
public void testRemoveViaValuesRemove() {
if (!isRemoveSupported()) {
return;
}
assumeTrue(isRemoveSupported());
final MultiValuedMap<K, V> map = makeFullMap();
final Collection<V> values = map.values();
values.remove("v0_0");
Expand Down

0 comments on commit cff3638

Please sign in to comment.