Skip to content
Snippets Groups Projects
Commit 55c7f0b5 authored by John Carlson's avatar John Carlson
Browse files

Remove Robolectric for native Android testing

parent a32b4734
No related branches found
No related tags found
No related merge requests found
Pipeline #
Loading
Loading
@@ -221,8 +221,11 @@ dependencies {
testImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
 
testImplementation 'junit:junit:4.12'
testImplementation 'org.robolectric:robolectric:3.4'
testImplementation('org.threeten:threetenbp:1.3.6') {
exclude group: 'com.jakewharton.threetenabp', module: 'threetenabp'
}
androidTestImplementation ('com.android.support.test:runner:1.0.0') {
exclude group:'com.android.support', module:'support-annotations'
}
}
package com.commit451.gitlab
 
import android.net.Uri
import com.commit451.gitlab.navigation.RoutingNavigator
 
/**
Loading
Loading
package com.commit451.gitlab
 
import android.net.Uri
import android.support.test.runner.AndroidJUnit4
import com.commit451.gitlab.navigation.RoutingRouter
import org.junit.Assert
import org.junit.BeforeClass
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
import org.robolectric.shadows.ShadowLog
 
/**
* Tests account login and basic retrieval stuff
*/
@RunWith(RobolectricTestRunner::class)
@Config(constants = BuildConfig::class, sdk = intArrayOf(21))
@RunWith(AndroidJUnit4::class)
class RoutingTests {
 
companion object {
@BeforeClass
@Throws(Exception::class)
fun setUp() {
//for logging
ShadowLog.stream = System.out
}
}
@Test
fun routeIssues() {
val countingRouter = CountingRouter()
Loading
Loading
package com.commit451.gitlab
import org.robolectric.TestLifecycleApplication
import java.lang.reflect.Method
/**
* Test version of our Application class, used by Robolectric
*/
class TestApp : App(), TestLifecycleApplication {
override fun beforeTest(method: Method) {
}
override fun prepareTest(test: Any) {
}
override fun afterTest(method: Method) {
}
override fun setupCrashReporting() {
//Intentionally left blank
}
override fun setupLeakCanary() {
//Intentionally left blank
}
override fun setupMultidex() {
//Intentionally left blank
}
override fun setupThreeTen() {
//Intentionally left blank
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment