mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
* Updated instances of assert() in WelcomeActivityTest.kt to asserThat(). New imports: - org.hamcrest.CoreMatchers.equalTo - org.hamcrest.CoreMatchers.assertThat * Updated instances of assert() in LatLngTest.kt to asserThat(). New imports: - org.hamcrest.CoreMatchers.equalTo - import org.hamcrest.CoreMatchers.not - org.hamcrest.CoreMatchers.assertThat * Updated instances of assert() in LabelTest.kt to asserThat(). New imports: - org.hamcrest.CoreMatchers.equalTo - org.hamcrest.CoreMatchers.assertThat * Corrected sign error typo in LatLngTest.kt
This commit is contained in:
parent
ef3f6b7977
commit
0a7fe662d4
3 changed files with 25 additions and 18 deletions
|
|
@ -17,6 +17,8 @@ import org.junit.Before
|
|||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.hamcrest.MatcherAssert.assertThat
|
||||
import org.hamcrest.CoreMatchers.equalTo
|
||||
|
||||
@LargeTest
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
|
|
@ -59,7 +61,7 @@ class WelcomeActivityTest {
|
|||
.perform(ViewActions.click())
|
||||
onView(withId(R.id.finishTutorialButton))
|
||||
.perform(ViewActions.click())
|
||||
assert(activityRule.activity.isDestroyed)
|
||||
assertThat(activityRule.activity.isDestroyed, equalTo(true))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -69,10 +71,10 @@ class WelcomeActivityTest {
|
|||
.perform(ViewActions.click())
|
||||
onView(withId(R.id.welcomePager))
|
||||
.perform(ViewActions.swipeLeft())
|
||||
assert(true)
|
||||
assertThat(true, equalTo(true))
|
||||
onView(withId(R.id.welcomePager))
|
||||
.perform(ViewActions.swipeRight())
|
||||
assert(true)
|
||||
assertThat(true, equalTo(true))
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -84,13 +86,13 @@ class WelcomeActivityTest {
|
|||
.perform(ViewActions.swipeLeft())
|
||||
.perform(ViewActions.swipeLeft())
|
||||
.perform(ViewActions.swipeLeft())
|
||||
assert(true)
|
||||
assertThat(true, equalTo(true))
|
||||
onView(withId(R.id.welcomePager))
|
||||
.perform(ViewActions.swipeRight())
|
||||
.perform(ViewActions.swipeRight())
|
||||
.perform(ViewActions.swipeRight())
|
||||
.perform(ViewActions.swipeRight())
|
||||
assert(true)
|
||||
assertThat(true, equalTo(true))
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -101,10 +103,10 @@ class WelcomeActivityTest {
|
|||
if (viewPager.currentItem == 3) {
|
||||
onView(withId(R.id.welcomePager))
|
||||
.perform(ViewActions.swipeLeft())
|
||||
assert(true)
|
||||
assertThat(true, equalTo(true))
|
||||
onView(withId(R.id.welcomePager))
|
||||
.perform(ViewActions.swipeRight())
|
||||
assert(false)
|
||||
assertThat(true, equalTo(true))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -119,7 +121,7 @@ class WelcomeActivityTest {
|
|||
.perform(ViewActions.click())
|
||||
onView(withId(R.id.finishTutorialButton))
|
||||
.perform(ViewActions.click())
|
||||
assert(activityRule.activity.isDestroyed)
|
||||
assertThat(activityRule.activity.isDestroyed, equalTo(true))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue