Prepares and returns a FlutterEngine
and Intent
primed with an engine for tests.
Definition at line 20 of file FlutterEngineRule.java.
◆ finished()
void io.flutter.embedding.engine.renderer.FlutterEngineRule.finished |
( |
Description |
description | ) |
|
|
inlineprotected |
◆ getFlutterEngine()
FlutterEngine io.flutter.embedding.engine.renderer.FlutterEngineRule.getFlutterEngine |
( |
| ) |
|
|
inlinepackage |
◆ getFlutterJNI()
FlutterJNI io.flutter.embedding.engine.renderer.FlutterEngineRule.getFlutterJNI |
( |
| ) |
|
|
inlinepackage |
Returns a Mockito-mocked version of FlutterJNI
.
- Returns
- an instance that is already considered attached.
Definition at line 54 of file FlutterEngineRule.java.
54 {
55 return this.flutterJNI;
56 }
◆ makeIntent()
Intent io.flutter.embedding.engine.renderer.FlutterEngineRule.makeIntent |
( |
| ) |
|
|
inlinepackage |
◆ setJniIsAttached()
void io.flutter.embedding.engine.renderer.FlutterEngineRule.setJniIsAttached |
( |
boolean |
isAttached | ) |
|
|
inlinepackage |
◆ starting()
void io.flutter.embedding.engine.renderer.FlutterEngineRule.starting |
( |
Description |
description | ) |
|
|
inlineprotected |
Definition at line 28 of file FlutterEngineRule.java.
28 {
29
30 flutterJNI = mock(FlutterJNI.class);
31 when(flutterJNI.
isAttached()).thenAnswer(
i -> jniIsAttached);
32
33
34 FlutterLoader mockFlutterLoader = mock(FlutterLoader.class);
35 when(mockFlutterLoader.automaticallyRegisterPlugins()).thenReturn(false);
36
37
38 flutterEngine =
new FlutterEngine(ctx, mockFlutterLoader, flutterJNI);
39
40
41 FlutterEngineCache.getInstance().put(cachedEngineId, flutterEngine);
42 }
The documentation for this class was generated from the following file: