File tree Expand file tree Collapse file tree 4 files changed +86
-0
lines changed
androidTest/java/in/shadowfax/proswipebutton
test/java/in/shadowfax/proswipebutton
androidTest/java/in/shadowfax/proswipebutton
test/java/in/shadowfax/proswipebutton Expand file tree Collapse file tree 4 files changed +86
-0
lines changed Original file line number Diff line number Diff line change 1+ package in .shadowfax .proswipebutton ;
2+
3+ import android .content .Context ;
4+ import android .support .test .InstrumentationRegistry ;
5+ import android .support .test .runner .AndroidJUnit4 ;
6+
7+ import org .junit .Test ;
8+ import org .junit .runner .RunWith ;
9+
10+ import static org .junit .Assert .*;
11+
12+ /**
13+ * Instrumentation test, which will execute on an Android device.
14+ *
15+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+ */
17+ @ RunWith (AndroidJUnit4 .class )
18+ public class ExampleInstrumentedTest {
19+ @ Test
20+ public void useAppContext () throws Exception {
21+ // Context of the app under test.
22+ Context appContext = InstrumentationRegistry .getTargetContext ();
23+
24+ assertEquals ("in.shadowfax.proswipebutton" , appContext .getPackageName ());
25+ }
26+ }
Original file line number Diff line number Diff line change 1+ package in .shadowfax .proswipebutton ;
2+
3+ import org .junit .Test ;
4+
5+ import static org .junit .Assert .*;
6+
7+ /**
8+ * Example local unit test, which will execute on the development machine (host).
9+ *
10+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
11+ */
12+ public class ExampleUnitTest {
13+ @ Test
14+ public void addition_isCorrect () throws Exception {
15+ assertEquals (4 , 2 + 2 );
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ package in .shadowfax .proswipebutton ;
2+
3+ import android .content .Context ;
4+ import android .support .test .InstrumentationRegistry ;
5+ import android .support .test .runner .AndroidJUnit4 ;
6+
7+ import org .junit .Test ;
8+ import org .junit .runner .RunWith ;
9+
10+ import static org .junit .Assert .*;
11+
12+ /**
13+ * Instrumentation test, which will execute on an Android device.
14+ *
15+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+ */
17+ @ RunWith (AndroidJUnit4 .class )
18+ public class ExampleInstrumentedTest {
19+ @ Test
20+ public void useAppContext () throws Exception {
21+ // Context of the app under test.
22+ Context appContext = InstrumentationRegistry .getTargetContext ();
23+
24+ assertEquals ("in.shadowfax.proswipebutton.test" , appContext .getPackageName ());
25+ }
26+ }
Original file line number Diff line number Diff line change 1+ package in .shadowfax .proswipebutton ;
2+
3+ import org .junit .Test ;
4+
5+ import static org .junit .Assert .*;
6+
7+ /**
8+ * Example local unit test, which will execute on the development machine (host).
9+ *
10+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
11+ */
12+ public class ExampleUnitTest {
13+ @ Test
14+ public void addition_isCorrect () throws Exception {
15+ assertEquals (4 , 2 + 2 );
16+ }
17+ }
You can’t perform that action at this time.
0 commit comments