File tree Expand file tree Collapse file tree
main/java/io/qameta/allure/assertj
test/java/io/qameta/allure/assertj Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,16 +55,11 @@ protected AllureLifecycle initialValue() {
5555 }
5656 };
5757
58- @ Pointcut ("execution(public org.assertj.core.api.AbstractAssert.new(..))" )
58+ @ Pointcut ("execution(!private org.assertj.core.api.AbstractAssert.new(..))" )
5959 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-
6863 @ Pointcut ("execution(* org.assertj.core.api.AssertJProxySetup.*(..))" )
6964 public void proxyMethod () {
7065 //pointcut body, should be empty
@@ -75,7 +70,7 @@ public void anyAssert() {
7570 //pointcut body, should be empty
7671 }
7772
78- @ After ("anyAssertCreation() || anyAssertCreation2() " )
73+ @ After ("anyAssertCreation()" )
7974 public void logAssertCreation (final JoinPoint joinPoint ) {
8075 final String actual = joinPoint .getArgs ().length > 0
8176 ? ObjectUtils .toString (joinPoint .getArgs ()[0 ])
Original file line number Diff line number Diff line change 2323import org .junit .jupiter .api .Test ;
2424
2525import java .nio .charset .StandardCharsets ;
26+ import java .util .Arrays ;
2627
2728import static io .qameta .allure .test .RunUtils .runWithinTestContext ;
2829import static org .assertj .core .api .Assertions .assertThat ;
@@ -87,6 +88,23 @@ void shouldHandleByteArrayObject() {
8788 );
8889 }
8990
91+ @ AllureFeatures .Steps
92+ @ Test
93+ void shouldHandleCollections () {
94+ final AllureResults results = runWithinTestContext (() -> {
95+ assertThat (Arrays .asList ("a" , "b" ))
96+ .containsExactly ("a" , "b" );
97+ }, AllureAspectJ ::setLifecycle );
98+
99+ assertThat (results .getTestResults ())
100+ .flatExtracting (TestResult ::getSteps )
101+ .extracting (StepResult ::getName )
102+ .containsExactly (
103+ "assertThat '[a, b]'" ,
104+ "containsExactly '[a, b]'"
105+ );
106+ }
107+
90108 @ AllureFeatures .Steps
91109 @ Test
92110 void softAssertions () {
You can’t perform that action at this time.
0 commit comments