Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ public void anyAssertCreation() {
//pointcut body, should be empty
}

@Pointcut("execution(public * org.assertj.core.api.AssertionsForClassTypes.*(..))")
public void anyAssertCreation2() {
//pointcut body, should be empty
}

@Pointcut("execution(* org.assertj.core.api.AssertJProxySetup.*(..))")
public void proxyMethod() {
//pointcut body, should be empty
Expand All @@ -70,7 +75,7 @@ public void anyAssert() {
//pointcut body, should be empty
}

@After("anyAssertCreation()")
@After("anyAssertCreation() || anyAssertCreation2()")
public void logAssertCreation(final JoinPoint joinPoint) {
final String actual = joinPoint.getArgs().length > 0
? ObjectUtils.toString(joinPoint.getArgs()[0])
Expand Down
1 change: 1 addition & 0 deletions allure-cucumber4-jvm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.slf4j:slf4j-simple")
testImplementation(project(":allure-java-commons-test"))
testImplementation(project(":allure-junit-platform"))
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,7 @@ void shouldSetStatusDetails() {
assertThat(testResults)
.extracting(TestResult::getStatusDetails)
.extracting(StatusDetails::getMessage)
.containsExactlyInAnyOrder("\n"
+ "Expecting:\n"
+ " <15>\n"
+ "to be equal to:\n"
+ " <123>\n"
+ "but was not.");
.containsExactlyInAnyOrder("expecting 15 to be equal to 123");
}

@AllureFeatures.BrokenTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ public void i_add_a_to_b() {

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

}
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,7 @@ void shouldSetStatusDetails() {
assertThat(testResults)
.extracting(TestResult::getStatusDetails)
.extracting(StatusDetails::getMessage)
.containsExactlyInAnyOrder("\n"
+ "Expecting:\n"
+ " <15>\n"
+ "to be equal to:\n"
+ " <123>\n"
+ "but was not.");
.containsExactlyInAnyOrder("expecting 15 to be equal to 123");
}

@AllureFeatures.BrokenTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ public void i_add_a_to_b() {

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

}
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,7 @@ void shouldSetStatusDetails() {
assertThat(testResults)
.extracting(TestResult::getStatusDetails)
.extracting(StatusDetails::getMessage)
.containsExactlyInAnyOrder("\n"
+ "Expecting:\n"
+ " <15>\n"
+ "to be equal to:\n"
+ " <123>\n"
+ "but was not.");
.containsExactlyInAnyOrder("expecting 15 to be equal to 123");
}

@AllureFeatures.BrokenTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ public void i_add_a_to_b() {

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

}
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ configure(subprojects) {
dependency("org.apache.tika:tika-core:1.25")
dependency("org.aspectj:aspectjrt:1.9.6")
dependency("org.aspectj:aspectjweaver:1.9.6")
dependency("org.assertj:assertj-core:3.17.2")
dependency("org.assertj:assertj-core:3.19.0")
dependency("org.codehaus.groovy:groovy-all:2.5.13")
dependency("org.freemarker:freemarker:2.3.31")
dependency("org.jboss.resteasy:resteasy-client:4.6.0.Final")
Expand Down