Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
testing
scenario_app
android
app
src
androidTest
java
dev
flutter
scenarios
ExampleInstrumentedTest.java
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
package
dev.flutter.scenarios;
6
7
import
static
org.junit.Assert.*;
8
9
import
android
.content.Context;
10
import
androidx.test.ext.junit.runners.AndroidJUnit4;
11
import
androidx.test.platform.app.InstrumentationRegistry;
12
import
org.junit.Test;
13
import
org.junit.runner.RunWith;
14
15
/**
16
* Instrumented test, which will execute on an Android device.
17
*
18
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
19
*/
20
@RunWith(AndroidJUnit4.class)
21
public class
ExampleInstrumentedTest
{
22
@Test
23
public
void
useAppContext
() {
24
// Context of the app under test.
25
Context
appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
26
27
assertEquals(
"dev.flutter.scenarios"
, appContext.getPackageName());
28
}
29
}
dev.flutter.scenarios.ExampleInstrumentedTest
Definition
ExampleInstrumentedTest.java:21
dev.flutter.scenarios.ExampleInstrumentedTest.useAppContext
void useAppContext()
Definition
ExampleInstrumentedTest.java:23
android
Definition
BitmapRegionDecoder.cpp:14
Context
Definition
SerialProcsTest.cpp:126
Generated on Fri Apr 26 2024 06:14:35 for Flutter Engine by
1.9.8