1package io.flutter.plugin.mouse;
3import static io.flutter.Build.API_LEVELS;
4import static org.junit.Assert.assertEquals;
5import static org.mockito.Mockito.any;
6import static org.mockito.Mockito.mock;
7import static org.mockito.Mockito.spy;
8import static org.mockito.Mockito.times;
9import static org.mockito.Mockito.verify;
11import android.annotation.TargetApi;
14import androidx.test.ext.junit.runners.AndroidJUnit4;
15import io.flutter.embedding.android.FlutterView;
16import io.flutter.embedding.engine.dart.DartExecutor;
17import io.flutter.embedding.engine.systemchannels.MouseCursorChannel;
18import io.flutter.plugin.common.MethodCall;
19import io.flutter.plugin.common.MethodChannel;
20import java.util.HashMap;
21import org.json.JSONException;
23import org.junit.runner.RunWith;
24import org.robolectric.Robolectric;
25import org.robolectric.annotation.Config;
29 minSdk = API_LEVELS.API_24,
31@RunWith(AndroidJUnit4.class)
32@TargetApi(API_LEVELS.API_24)
35 @SuppressWarnings(
"deprecation")
50 "activateSystemCursor",
51 new HashMap<String, Object>() {
52 private static final long serialVersionUID = 1
L;
60 verify(testView,
times(1)).getSystemPointerIcon(PointerIcon.TYPE_TEXT);
61 verify(testView,
times(1)).setPointerIcon(
any(PointerIcon.class));
62 assertEquals(methodResult.
result, Boolean.TRUE);
75 public void error(String errorCode, String errorMessage, Object errorDetails) {}
static SkISize times(const SkISize &size, float factor)
void synthesizeMethodCall(@NonNull MethodCall call, @NonNull MethodChannel.Result result)
void mouseCursorPlugin_SetsSystemCursorOnRequest()
void success(Object result)
void error(String errorCode, String errorMessage, Object errorDetails)
SIT bool any(const Vec< 1, T > &x)