Skip to content

Commit

Permalink
Merge branch 'fix-robolectric-tests' into fix-55.1
Browse files Browse the repository at this point in the history
  • Loading branch information
UweTrottmann committed Sep 16, 2020
2 parents f88fcb7 + a1fd4db commit cd6f91f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.battlelancer.seriesguide

import android.app.Application

/**
* Empty [Application] to use with Robolectric @Config to avoid errors
* with components that require an actual device to initialize.
*/
class EmptyTestApplication : Application()
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package com.battlelancer.seriesguide.thetvdbapi

import com.battlelancer.seriesguide.EmptyTestApplication
import com.google.common.truth.Truth.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config

@RunWith(RobolectricTestRunner::class)
@Config(application = EmptyTestApplication::class)
class TvdbImageToolsTest {

@Test
Expand Down

0 comments on commit cd6f91f

Please sign in to comment.