Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. private lateinit var activity: MyActivity
  2.  
  3. @Before
  4. fun setUp() {
  5. // Prepare fake data for MyActivity and MyFragment
  6. // ...
  7.  
  8. // Open the activity that contains the Fragment under test
  9. activity = Robolectric.setupActivity(MyActivity::class.java)
  10.  
  11. // If necessary, click button X to open the fragment
  12. // ...
  13. }
  14.  
  15. @Test
  16. fun `when loading, progressbar is displayed`() {
  17. whenSearchReturns(Single.never())
  18.  
  19. performQuery("brexit")
  20. progressBar().shouldBeVisible()
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement