Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private lateinit var activity: MyActivity
- @Before
- fun setUp() {
- // Prepare fake data for MyActivity and MyFragment
- // ...
- // Open the activity that contains the Fragment under test
- activity = Robolectric.setupActivity(MyActivity::class.java)
- // If necessary, click button X to open the fragment
- // ...
- }
- @Test
- fun `when loading, progressbar is displayed`() {
- whenSearchReturns(Single.never())
- performQuery("brexit")
- progressBar().shouldBeVisible()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement