File tree 2 files changed +3
-9
lines changed
approvaltests/src/main/java/org/approvaltests
2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change 3
3
import org .approvaltests .Approvals ;
4
4
import org .approvaltests .core .Experimental ;
5
5
import org .approvaltests .core .Options ;
6
- import org .approvaltests .namer .NamedEnvironment ;
7
- import org .approvaltests .namer .NamerFactory ;
8
6
import org .junit .jupiter .api .DynamicTest ;
9
- import org .lambda .actions .Action0 ;
10
7
import org .lambda .actions .Action1 ;
11
8
12
9
public class JupiterApprovals
Original file line number Diff line number Diff line change 6
6
import com .spun .util .io .StackElementSelector ;
7
7
import com .spun .util .tests .TestUtils ;
8
8
import org .approvaltests .integrations .junit5 .JUnitUtils ;
9
+ import org .lambda .query .Queryable ;
9
10
10
11
import java .lang .annotation .Annotation ;
11
12
import java .lang .reflect .Method ;
@@ -142,12 +143,8 @@ private static void checkConditionsForAttribute(Class<? extends Annotation> attr
142
143
private static boolean isDynamicWrapperPresent ()
143
144
{
144
145
StackTraceElement [] stackTrace = ThreadUtils .getStackTrace ();
145
- for (StackTraceElement stackTraceElement : stackTrace )
146
- {
147
- if ("org.approvaltests.integrations.junit5.JupiterApprovals" .equals (stackTraceElement .getClassName ()))
148
- { return true ; }
149
- }
150
- return false ;
146
+ return Queryable .as (stackTrace )
147
+ .any (stackTraceElement -> "org.approvaltests.integrations.junit5.JupiterApprovals" .equals (stackTraceElement .getClassName ()));
151
148
}
152
149
public static List <Method > getMethodsByName (Class <?> clazz , String methodName )
153
150
{
You can’t perform that action at this time.
0 commit comments