|
33 | 33 | import static org.hamcrest.Matchers.allOf; |
34 | 34 | import static org.hamcrest.Matchers.is; |
35 | 35 |
|
36 | | -@LargeTest @RunWith(AndroidJUnit4.class) public class MainActivityTest { |
| 36 | +@LargeTest |
| 37 | +@RunWith(AndroidJUnit4.class) |
| 38 | +public class MainActivityTest { |
37 | 39 |
|
38 | | - @Rule public ActivityTestRule<MainActivity> mActivityTestRule = |
| 40 | + @Rule |
| 41 | + public ActivityTestRule<MainActivity> mActivityTestRule = |
39 | 42 | new ActivityTestRule<>(MainActivity.class, false, false); |
40 | 43 |
|
41 | | - @Before public void before() { |
| 44 | + @Before |
| 45 | + public void before() { |
42 | 46 | // Sign out of any existing sessions |
43 | 47 | FirebaseAuth.getInstance().signOut(); |
44 | 48 | } |
45 | 49 |
|
46 | | - @Test public void testAddItemsAndReview() throws InterruptedException { |
| 50 | + @Test |
| 51 | + public void testAddItemsAndReview() throws InterruptedException { |
47 | 52 | mActivityTestRule.launchActivity(new Intent()); |
48 | 53 | Thread.sleep(2000); |
49 | 54 |
|
@@ -109,12 +114,14 @@ private static Matcher<View> childAtPosition(final Matcher<View> parentMatcher, |
109 | 114 | final int position) { |
110 | 115 |
|
111 | 116 | return new TypeSafeMatcher<View>() { |
112 | | - @Override public void describeTo(Description description) { |
| 117 | + @Override |
| 118 | + public void describeTo(Description description) { |
113 | 119 | description.appendText("Child at position " + position + " in parent "); |
114 | 120 | parentMatcher.describeTo(description); |
115 | 121 | } |
116 | 122 |
|
117 | | - @Override public boolean matchesSafely(View view) { |
| 123 | + @Override |
| 124 | + public boolean matchesSafely(View view) { |
118 | 125 | ViewParent parent = view.getParent(); |
119 | 126 | return parent instanceof ViewGroup && parentMatcher.matches(parent) && view.equals( |
120 | 127 | ((ViewGroup) parent).getChildAt(position)); |
|
0 commit comments