File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
platform-tests/src/test/java/org/junit/platform/commons/support Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -280,4 +280,28 @@ void findMethodsPreconditions() {
280280 () -> ReflectionSupport .findMethods (ReflectionSupportTests .class , allMethods , null ));
281281 }
282282
283+ @ Test
284+ void findNestedClassesDelegates () throws Exception {
285+ assertEquals (ReflectionUtils .findNestedClasses (ClassWithNestedClasses .class , ReflectionUtils ::isStatic ),
286+ ReflectionSupport .findNestedClasses (ClassWithNestedClasses .class , ReflectionUtils ::isStatic ));
287+ }
288+
289+ @ Test
290+ void findNestedClassesPreconditions () throws Exception {
291+ assertPreconditionViolationException ("Class" ,
292+ () -> ReflectionSupport .findNestedClasses (null , ReflectionUtils ::isStatic ));
293+ assertPreconditionViolationException ("Predicate" ,
294+ () -> ReflectionSupport .findNestedClasses (ClassWithNestedClasses .class , null ));
295+ }
296+
297+ static class ClassWithNestedClasses {
298+
299+ class Nested1 {
300+ }
301+
302+ static class Nested2 {
303+ }
304+
305+ }
306+
283307}
You can’t perform that action at this time.
0 commit comments