mercredi 3 août 2016

how to unit test uploading happens when the app is running in the background

I want to write a unit test function, which aims at testing uploading happens when the app is running in the background. It is generally like this:

func checkBackgroundUploading() {
   set the UIState to be background
   write a record and upload it to database in this UIState
}

I know how to do the second step, but how to set the UIState to be background?

Aucun commentaire:

Enregistrer un commentaire