Add basic integration test
Summary: Just a quick startup test that can save you the time of manually opening the app. I don't have any plans of hooking this up in Circle, but it's still kinda useful to have. Reviewed By: jknoxville Differential Revision: D12901590 fbshipit-source-id: a16a1814574d9f27770dcf98c6b238517c589930
This commit is contained in:
committed by
Facebook Github Bot
parent
d54fb3a21a
commit
a7fd546f0e
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2018-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*
|
||||
*/
|
||||
package com.facebook.flipper.sample;
|
||||
|
||||
import androidx.test.filters.LargeTest;
|
||||
import androidx.test.rule.ActivityTestRule;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@LargeTest
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class MainActivityTest {
|
||||
|
||||
@Rule
|
||||
public final ActivityTestRule<MainActivity> mTestRule =
|
||||
new ActivityTestRule<>(MainActivity.class);
|
||||
|
||||
@Test
|
||||
public void activityStarts() {
|
||||
final MainActivity activity = mTestRule.getActivity();
|
||||
|
||||
assert activity != null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user