Manager().getJobStorage().injectDatabase(null) // reset request = manager().getJobRequest(jobId) ĪssertThat(request.getLastRun()). We’ll also talk about Shortcuts because I think they are essential. Notebooks, tags, and notebook stacks are the main ways to organize your notes in Evernote. kinda hacky, this removes the request from the cache, but doesn't delete it in the database, // because we're using the mock at the moment manager().getJobStorage(). Evernote has several organizational features built in that will help you stay on top of your notes. Request.updateStats( true, true ) // updates the database value, but fails in this case assertThat(request.getFailureCount()).isEqualTo( 1 ) // in memory value was updated, keep that assertThat(request.getLastRun()).isGreaterThan( 0 ) Manager().getJobStorage().injectDatabase(database) When(database.update(anyString(), any(ContentValues. SQLiteDatabase database = mock(SQLiteDatabase. JobRequest request = DummyJobs.createOneOff() ĪssertThat(request.getScheduledAt()).isGreaterThan(0L) ĪssertThat(request.getFailureCount()).isEqualTo( 0 ) ĪssertThat(request.getLastRun()).isEqualTo( 0 )
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |