Definition at line 29 of file DartExecutorTest.java.
◆ itHasReasonableDefaultsWhenFlutterLoaderIsInitialized()
void io.flutter.embedding.engine.dart.DartExecutorTest.itHasReasonableDefaultsWhenFlutterLoaderIsInitialized |
( |
| ) |
|
|
inline |
Definition at line 78 of file DartExecutorTest.java.
78 {
81 FlutterInjector.setInstance(
83 DartEntrypoint entrypoint = DartEntrypoint.createDefault();
84 assertEquals(entrypoint.pathToBundle, "my/custom/path");
85 assertEquals(entrypoint.dartEntrypointFunctionName, "main");
86 }
FlutterLoader mockFlutterLoader
String findAppBundlePath()
◆ itNotifiesLowMemoryWarning()
void io.flutter.embedding.engine.dart.DartExecutorTest.itNotifiesLowMemoryWarning |
( |
| ) |
|
|
inline |
Definition at line 59 of file DartExecutorTest.java.
59 {
60 FlutterJNI mockFlutterJNI = mock(FlutterJNI.class);
61 when(mockFlutterJNI.isAttached()).thenReturn(true);
62
63 DartExecutor dartExecutor = new DartExecutor(mockFlutterJNI, mock(AssetManager.class));
64 dartExecutor.notifyLowMemoryWarning();
65 verify(mockFlutterJNI,
times(1)).notifyLowMemoryWarning();
66 }
static SkISize times(const SkISize &size, float factor)
◆ itSendsBinaryMessages()
void io.flutter.embedding.engine.dart.DartExecutorTest.itSendsBinaryMessages |
( |
| ) |
|
|
inline |
Definition at line 39 of file DartExecutorTest.java.
39 {
40
41 FlutterJNI fakeFlutterJni = mock(FlutterJNI.class);
42
43
44 DartExecutor dartExecutor = new DartExecutor(fakeFlutterJni, mock(AssetManager.class));
45
46
47 assertNotNull(dartExecutor.getBinaryMessenger());
48
49
50 ByteBuffer fakeMessage = mock(ByteBuffer.class);
51 dartExecutor.getBinaryMessenger().send("fake_channel", fakeMessage);
52
53
54 verify(fakeFlutterJni,
times(1))
55 .dispatchPlatformMessage(
eq(
"fake_channel"),
eq(fakeMessage), anyInt(), anyInt());
56 }
static bool eq(const SkM44 &a, const SkM44 &b, float tol)
◆ itThrowsWhenCreatingADefaultDartEntrypointWithAnUninitializedFlutterLoader()
void io.flutter.embedding.engine.dart.DartExecutorTest.itThrowsWhenCreatingADefaultDartEntrypointWithAnUninitializedFlutterLoader |
( |
| ) |
|
|
inline |
Definition at line 69 of file DartExecutorTest.java.
69 {
70 assertThrows(
71 AssertionError.class,
72 () -> {
73 DartEntrypoint.createDefault();
74 });
75 }
◆ setUp()
void io.flutter.embedding.engine.dart.DartExecutorTest.setUp |
( |
| ) |
|
|
inline |
Definition at line 33 of file DartExecutorTest.java.
33 {
34 FlutterInjector.reset();
35 MockitoAnnotations.openMocks(this);
36 }
◆ mockFlutterLoader
FlutterLoader io.flutter.embedding.engine.dart.DartExecutorTest.mockFlutterLoader |
|
package |
The documentation for this class was generated from the following file: