File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed
example/android/app/src/androidTest/java/com/example/InstabugSample Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change 77import org .junit .Test ;
88import org .junit .runner .RunWith ;
99
10- import java .lang .reflect .InvocationTargetException ;
11- import java .lang .reflect .Method ;
12-
1310import static androidx .test .espresso .Espresso .onView ;
1411import static androidx .test .espresso .action .ViewActions .click ;
1512import static androidx .test .espresso .action .ViewActions .replaceText ;
@@ -41,25 +38,5 @@ public void ensureInstabugInvocati1on() throws InterruptedException {
4138 private void disableScreenShotByMediaProjection () {
4239 InstabugFlutterPlugin .enableScreenShotByMediaProjection (false );
4340 }
44-
45- public static Method getMethod (Class clazz , String methodName , Class ... parameterType ) {
46- final Method [] methods = clazz .getDeclaredMethods ();
47- for (Method method : methods ) {
48- if (method .getName ().equals (methodName ) && method .getParameterTypes ().length ==
49- parameterType .length ) {
50- for (int i = 0 ; i < parameterType .length ; i ++) {
51- if (method .getParameterTypes ()[i ] == parameterType [i ]) {
52- if (i == method .getParameterTypes ().length - 1 ) {
53- method .setAccessible (true );
54- return method ;
55- }
56- } else {
57- break ;
58- }
59- }
60- }
61- }
62- return null ;
63- }
6441}
6542
You can’t perform that action at this time.
0 commit comments