File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
packages/quick_actions/quick_actions_android
src/test/java/io/flutter/plugins/quickactions Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 1+ ## NEXT
2+
3+ * Updates mockito-core to 4.6.1.
4+ * Removes deprecated FieldSetter from QuickActionsTest.
5+
16## 0.6.2
27
3- * Update gradle version to 7.2.1 on Android .
8+ * Updates gradle version to 7.2.1.
49
510## 0.6.1
611
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ android {
3535
3636 dependencies {
3737 testImplementation ' junit:junit:4.13.2'
38- testImplementation ' org.mockito:mockito-core:3.2.4 '
38+ testImplementation ' org.mockito:mockito-core:4.6.1 '
3939 }
4040
4141 compileOptions {
Original file line number Diff line number Diff line change 2929import java .nio .ByteBuffer ;
3030import org .junit .After ;
3131import org .junit .Test ;
32- import org .mockito .internal .util .reflection .FieldSetter ;
3332
3433public class QuickActionsTest {
3534 private static class TestBinaryMessenger implements BinaryMessenger {
@@ -79,10 +78,9 @@ public void onAttachedToActivity_buildVersionSupported_invokesLaunchMethod()
7978 final QuickActionsPlugin plugin = new QuickActionsPlugin ();
8079 setUpMessengerAndFlutterPluginBinding (testBinaryMessenger , plugin );
8180 setBuildVersion (SUPPORTED_BUILD );
82- FieldSetter .setField (
83- plugin ,
84- QuickActionsPlugin .class .getDeclaredField ("handler" ),
85- mock (MethodCallHandlerImpl .class ));
81+ Field handler = plugin .getClass ().getDeclaredField ("handler" );
82+ handler .setAccessible (true );
83+ handler .set (plugin , mock (MethodCallHandlerImpl .class ));
8684 final Intent mockIntent = createMockIntentWithQuickActionExtra ();
8785 final Activity mockMainActivity = mock (Activity .class );
8886 when (mockMainActivity .getIntent ()).thenReturn (mockIntent );
You can’t perform that action at this time.
0 commit comments