Skip to content

Commit

Permalink
API: Replace deprecated asList with asInstanceOf (#11875)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebyhr authored Dec 26, 2024
1 parent bb27030 commit fc3f705
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import java.io.IOException;
import java.util.Arrays;
import org.assertj.core.api.InstanceOfAssertFactories;
import org.junit.jupiter.api.Test;

public class TestExceptionUtil {
Expand Down Expand Up @@ -53,7 +54,7 @@ public void testRunSafely() {
.isInstanceOf(CustomCheckedException.class)
.isEqualTo(exc)
.extracting(e -> Arrays.asList(e.getSuppressed()))
.asList()
.asInstanceOf(InstanceOfAssertFactories.LIST)
.hasSize(2)
.containsExactly(suppressedOne, suppressedTwo);
}
Expand Down Expand Up @@ -82,7 +83,7 @@ public void testRunSafelyTwoExceptions() {
.isInstanceOf(CustomCheckedException.class)
.isEqualTo(exc)
.extracting(e -> Arrays.asList(e.getSuppressed()))
.asList()
.asInstanceOf(InstanceOfAssertFactories.LIST)
.hasSize(2)
.containsExactly(suppressedOne, suppressedTwo);
}
Expand Down Expand Up @@ -112,7 +113,7 @@ public void testRunSafelyThreeExceptions() {
.isInstanceOf(CustomCheckedException.class)
.isEqualTo(exc)
.extracting(e -> Arrays.asList(e.getSuppressed()))
.asList()
.asInstanceOf(InstanceOfAssertFactories.LIST)
.hasSize(2)
.containsExactly(suppressedOne, suppressedTwo);
}
Expand All @@ -137,7 +138,7 @@ public void testRunSafelyRuntimeExceptions() {
.isInstanceOf(RuntimeException.class)
.isEqualTo(exc)
.extracting(e -> Arrays.asList(e.getSuppressed()))
.asList()
.asInstanceOf(InstanceOfAssertFactories.LIST)
.hasSize(2)
.containsExactly(suppressedOne, suppressedTwo);
}
Expand Down

0 comments on commit fc3f705

Please sign in to comment.