Upgrade to AssertJ 3.16
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,7 +25,6 @@ import org.junit.jupiter.api.Test;
|
||||
import org.opentest4j.TestAbortedException;
|
||||
|
||||
import static java.util.stream.Collectors.joining;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatCode;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
|
||||
@@ -104,11 +103,11 @@ class TestGroupTests {
|
||||
assertThatIllegalStateException()
|
||||
.isThrownBy(() -> assumeGroup(LONG_RUNNING))
|
||||
.withMessageStartingWith("Failed to parse '" + TEST_GROUPS_SYSTEM_PROPERTY + "' system property: ")
|
||||
.withCauseInstanceOf(IllegalArgumentException.class)
|
||||
.satisfies(ex ->
|
||||
assertThat(ex.getCause().getMessage()).isEqualTo(
|
||||
"Unable to find test group 'bogus' when parsing testGroups value: '" + testGroups +
|
||||
"'. Available groups include: [LONG_RUNNING,PERFORMANCE]"));
|
||||
.havingCause()
|
||||
.isInstanceOf(IllegalArgumentException.class)
|
||||
.withMessage(
|
||||
"Unable to find test group 'bogus' when parsing testGroups value: '" + testGroups +
|
||||
"'. Available groups include: [LONG_RUNNING,PERFORMANCE]");
|
||||
}
|
||||
|
||||
private void setTestGroups(TestGroup... testGroups) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -79,12 +79,14 @@ class ListenableFutureTaskTests {
|
||||
});
|
||||
task.run();
|
||||
|
||||
assertThatExceptionOfType(ExecutionException.class).isThrownBy(
|
||||
task::get)
|
||||
.satisfies(ex -> assertThat(ex.getCause().getMessage()).isEqualTo(s));
|
||||
assertThatExceptionOfType(ExecutionException.class).isThrownBy(
|
||||
task.completable()::get)
|
||||
.satisfies(ex -> assertThat(ex.getCause().getMessage()).isEqualTo(s));
|
||||
assertThatExceptionOfType(ExecutionException.class)
|
||||
.isThrownBy(task::get)
|
||||
.havingCause()
|
||||
.withMessage(s);
|
||||
assertThatExceptionOfType(ExecutionException.class)
|
||||
.isThrownBy(task.completable()::get)
|
||||
.havingCause()
|
||||
.withMessage(s);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user