Skip to content

Commit d1311ab

Browse files
bump assertj-core from 3.17.2 to 3.19.0 (via #545)
1 parent ab64037 commit d1311ab

File tree

9 files changed

+23
-26
lines changed

9 files changed

+23
-26
lines changed

allure-assertj/src/main/java/io/qameta/allure/assertj/AllureAspectJ.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ public void anyAssertCreation() {
6060
//pointcut body, should be empty
6161
}
6262

63+
@Pointcut("execution(public * org.assertj.core.api.AssertionsForClassTypes.*(..))")
64+
public void anyAssertCreation2() {
65+
//pointcut body, should be empty
66+
}
67+
6368
@Pointcut("execution(* org.assertj.core.api.AssertJProxySetup.*(..))")
6469
public void proxyMethod() {
6570
//pointcut body, should be empty
@@ -70,7 +75,7 @@ public void anyAssert() {
7075
//pointcut body, should be empty
7176
}
7277

73-
@After("anyAssertCreation()")
78+
@After("anyAssertCreation() || anyAssertCreation2()")
7479
public void logAssertCreation(final JoinPoint joinPoint) {
7580
final String actual = joinPoint.getArgs().length > 0
7681
? ObjectUtils.toString(joinPoint.getArgs()[0])

allure-cucumber4-jvm/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dependencies {
1515
testImplementation("org.junit.jupiter:junit-jupiter-api")
1616
testImplementation("org.slf4j:slf4j-simple")
1717
testImplementation(project(":allure-java-commons-test"))
18+
testImplementation(project(":allure-junit-platform"))
1819
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
1920
}
2021

allure-cucumber4-jvm/src/test/java/io/qameta/allure/cucumber4jvm/AllureCucumber4JvmTest.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,7 @@ void shouldSetStatusDetails() {
123123
assertThat(testResults)
124124
.extracting(TestResult::getStatusDetails)
125125
.extracting(StatusDetails::getMessage)
126-
.containsExactlyInAnyOrder("\n"
127-
+ "Expecting:\n"
128-
+ " <15>\n"
129-
+ "to be equal to:\n"
130-
+ " <123>\n"
131-
+ "but was not.");
126+
.containsExactlyInAnyOrder("expecting 15 to be equal to 123");
132127
}
133128

134129
@AllureFeatures.BrokenTests

allure-cucumber4-jvm/src/test/java/io/qameta/allure/cucumber4jvm/samples/SimpleFeatureSteps.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ public void i_add_a_to_b() {
4646

4747
@Then("^result is (\\d+)$")
4848
public void result_is(int arg1) {
49-
Assertions.assertThat(this.c)
50-
.isEqualTo(arg1);
49+
// use manual fail for more stable message format
50+
if (this.c != arg1) {
51+
Assertions.fail("expecting %d to be equal to %d", this.c, arg1);
52+
}
5153
}
5254

5355
}

allure-cucumber5-jvm/src/test/java/io/qameta/allure/cucumber5jvm/AllureCucumber5JvmTest.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,7 @@ void shouldSetStatusDetails() {
108108
assertThat(testResults)
109109
.extracting(TestResult::getStatusDetails)
110110
.extracting(StatusDetails::getMessage)
111-
.containsExactlyInAnyOrder("\n"
112-
+ "Expecting:\n"
113-
+ " <15>\n"
114-
+ "to be equal to:\n"
115-
+ " <123>\n"
116-
+ "but was not.");
111+
.containsExactlyInAnyOrder("expecting 15 to be equal to 123");
117112
}
118113

119114
@AllureFeatures.BrokenTests

allure-cucumber5-jvm/src/test/java/io/qameta/allure/cucumber5jvm/samples/SimpleFeatureSteps.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ public void i_add_a_to_b() {
4646

4747
@Then("^result is (\\d+)$")
4848
public void result_is(int arg1) {
49-
Assertions.assertThat(this.c)
50-
.isEqualTo(arg1);
49+
// use manual fail for more stable message format
50+
if (this.c != arg1) {
51+
Assertions.fail("expecting %d to be equal to %d", this.c, arg1);
52+
}
5153
}
5254

5355
}

allure-cucumber6-jvm/src/test/java/io/qameta/allure/cucumber6jvm/AllureCucumber6JvmTest.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,7 @@ void shouldSetStatusDetails() {
108108
assertThat(testResults)
109109
.extracting(TestResult::getStatusDetails)
110110
.extracting(StatusDetails::getMessage)
111-
.containsExactlyInAnyOrder("\n"
112-
+ "Expecting:\n"
113-
+ " <15>\n"
114-
+ "to be equal to:\n"
115-
+ " <123>\n"
116-
+ "but was not.");
111+
.containsExactlyInAnyOrder("expecting 15 to be equal to 123");
117112
}
118113

119114
@AllureFeatures.BrokenTests

allure-cucumber6-jvm/src/test/java/io/qameta/allure/cucumber6jvm/samples/SimpleFeatureSteps.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ public void i_add_a_to_b() {
4646

4747
@Then("^result is (\\d+)$")
4848
public void result_is(int arg1) {
49-
Assertions.assertThat(this.c)
50-
.isEqualTo(arg1);
49+
// use manual fail for more stable message format
50+
if (this.c != arg1) {
51+
Assertions.fail("expecting %d to be equal to %d", this.c, arg1);
52+
}
5153
}
5254

5355
}

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ configure(subprojects) {
9494
dependency("org.apache.tika:tika-core:1.25")
9595
dependency("org.aspectj:aspectjrt:1.9.6")
9696
dependency("org.aspectj:aspectjweaver:1.9.6")
97-
dependency("org.assertj:assertj-core:3.17.2")
97+
dependency("org.assertj:assertj-core:3.19.0")
9898
dependency("org.codehaus.groovy:groovy-all:2.5.13")
9999
dependency("org.freemarker:freemarker:2.3.31")
100100
dependency("org.jboss.resteasy:resteasy-client:4.6.0.Final")

0 commit comments

Comments
 (0)