Loading app/build.gradle +9 −8 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ android { } defaultConfig { testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } } Loading @@ -75,13 +75,14 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:cardview-v7:28.0.0' implementation 'com.android.support:design:28.0.0' implementation 'com.android.support:preference-v14:28.0.0' implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.fragment:fragment:1.0.0' implementation 'androidx.legacy:legacy-preference-v14:1.0.0' implementation 'com.google.android.material:material:1.0.0' implementation 'com.github.yukuku:ambilwarna:2.0.1' implementation 'com.mikepenz:aboutlibraries:6.0.9' implementation 'com.mikepenz:aboutlibraries:6.2.0' implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0' implementation 'commons-io:commons-io:2.6' Loading @@ -90,8 +91,8 @@ dependencies { implementation 'org.apache.commons:commons-collections4:4.1' // for tests androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test:rules:1.0.2' androidTestImplementation 'androidx.test:runner:1.1.0' androidTestImplementation 'androidx.test:rules:1.1.0' androidTestImplementation 'junit:junit:4.12' androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.11.0' Loading app/src/androidTest/java/at/bitfire/davdroid/CustomTlsSocketFactoryTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ package at.bitfire.davdroid import android.support.test.InstrumentationRegistry.getInstrumentation import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation import at.bitfire.cert4android.CustomCertManager import okhttp3.OkHttpClient import okhttp3.Request Loading Loading @@ -54,7 +54,7 @@ class CustomTlsSocketFactoryTest { @Test fun testSendClientCertificate() { var public: X509Certificate? = null javaClass.classLoader.getResourceAsStream("sample.crt").use { javaClass.classLoader!!.getResourceAsStream("sample.crt").use { public = CertificateFactory.getInstance("X509").generateCertificate(it) as? X509Certificate } assertNotNull(public) Loading app/src/androidTest/java/at/bitfire/davdroid/model/CollectionInfoTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ package at.bitfire.davdroid.model import android.content.ContentValues import android.support.test.filters.SmallTest import androidx.test.filters.SmallTest import at.bitfire.dav4android.DavResource import at.bitfire.dav4android.property.ResourceType import at.bitfire.davdroid.HttpClient Loading app/src/androidTest/java/at/bitfire/davdroid/settings/SettingsTest.kt +2 −4 Original line number Diff line number Diff line Loading @@ -8,8 +8,7 @@ package at.bitfire.davdroid.settings import android.support.test.InstrumentationRegistry import android.support.test.InstrumentationRegistry.getTargetContext import androidx.test.platform.app.InstrumentationRegistry import at.bitfire.davdroid.App import junit.framework.Assert.assertFalse import junit.framework.Assert.assertTrue Loading @@ -23,8 +22,7 @@ class SettingsTest { @Before fun init() { InstrumentationRegistry.getContext().isRestricted settings = Settings.getInstance(getTargetContext())!! settings = Settings.getInstance(InstrumentationRegistry.getInstrumentation().targetContext)!! } @After Loading app/src/androidTest/java/at/bitfire/davdroid/ui/setup/DavResourceFinderTest.kt +3 −3 Original line number Diff line number Diff line Loading @@ -8,8 +8,8 @@ package at.bitfire.davdroid.ui.setup import android.support.test.InstrumentationRegistry.getTargetContext import android.support.test.filters.SmallTest import androidx.test.filters.SmallTest import androidx.test.platform.app.InstrumentationRegistry import at.bitfire.dav4android.DavResource import at.bitfire.dav4android.property.AddressbookHomeSet import at.bitfire.dav4android.property.ResourceType Loading Loading @@ -52,7 +52,7 @@ class DavResourceFinderTest { server.start() loginInfo = LoginInfo(URI.create("/"), Credentials("mock", "12345")) finder = DavResourceFinder(getTargetContext(), loginInfo) finder = DavResourceFinder(InstrumentationRegistry.getInstrumentation().targetContext, loginInfo) client = HttpClient.Builder() .addAuthentication(null, loginInfo.credentials) Loading Loading
app/build.gradle +9 −8 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ android { } defaultConfig { testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } } Loading @@ -75,13 +75,14 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:cardview-v7:28.0.0' implementation 'com.android.support:design:28.0.0' implementation 'com.android.support:preference-v14:28.0.0' implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.fragment:fragment:1.0.0' implementation 'androidx.legacy:legacy-preference-v14:1.0.0' implementation 'com.google.android.material:material:1.0.0' implementation 'com.github.yukuku:ambilwarna:2.0.1' implementation 'com.mikepenz:aboutlibraries:6.0.9' implementation 'com.mikepenz:aboutlibraries:6.2.0' implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0' implementation 'commons-io:commons-io:2.6' Loading @@ -90,8 +91,8 @@ dependencies { implementation 'org.apache.commons:commons-collections4:4.1' // for tests androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test:rules:1.0.2' androidTestImplementation 'androidx.test:runner:1.1.0' androidTestImplementation 'androidx.test:rules:1.1.0' androidTestImplementation 'junit:junit:4.12' androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.11.0' Loading
app/src/androidTest/java/at/bitfire/davdroid/CustomTlsSocketFactoryTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ package at.bitfire.davdroid import android.support.test.InstrumentationRegistry.getInstrumentation import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation import at.bitfire.cert4android.CustomCertManager import okhttp3.OkHttpClient import okhttp3.Request Loading Loading @@ -54,7 +54,7 @@ class CustomTlsSocketFactoryTest { @Test fun testSendClientCertificate() { var public: X509Certificate? = null javaClass.classLoader.getResourceAsStream("sample.crt").use { javaClass.classLoader!!.getResourceAsStream("sample.crt").use { public = CertificateFactory.getInstance("X509").generateCertificate(it) as? X509Certificate } assertNotNull(public) Loading
app/src/androidTest/java/at/bitfire/davdroid/model/CollectionInfoTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ package at.bitfire.davdroid.model import android.content.ContentValues import android.support.test.filters.SmallTest import androidx.test.filters.SmallTest import at.bitfire.dav4android.DavResource import at.bitfire.dav4android.property.ResourceType import at.bitfire.davdroid.HttpClient Loading
app/src/androidTest/java/at/bitfire/davdroid/settings/SettingsTest.kt +2 −4 Original line number Diff line number Diff line Loading @@ -8,8 +8,7 @@ package at.bitfire.davdroid.settings import android.support.test.InstrumentationRegistry import android.support.test.InstrumentationRegistry.getTargetContext import androidx.test.platform.app.InstrumentationRegistry import at.bitfire.davdroid.App import junit.framework.Assert.assertFalse import junit.framework.Assert.assertTrue Loading @@ -23,8 +22,7 @@ class SettingsTest { @Before fun init() { InstrumentationRegistry.getContext().isRestricted settings = Settings.getInstance(getTargetContext())!! settings = Settings.getInstance(InstrumentationRegistry.getInstrumentation().targetContext)!! } @After Loading
app/src/androidTest/java/at/bitfire/davdroid/ui/setup/DavResourceFinderTest.kt +3 −3 Original line number Diff line number Diff line Loading @@ -8,8 +8,8 @@ package at.bitfire.davdroid.ui.setup import android.support.test.InstrumentationRegistry.getTargetContext import android.support.test.filters.SmallTest import androidx.test.filters.SmallTest import androidx.test.platform.app.InstrumentationRegistry import at.bitfire.dav4android.DavResource import at.bitfire.dav4android.property.AddressbookHomeSet import at.bitfire.dav4android.property.ResourceType Loading Loading @@ -52,7 +52,7 @@ class DavResourceFinderTest { server.start() loginInfo = LoginInfo(URI.create("/"), Credentials("mock", "12345")) finder = DavResourceFinder(getTargetContext(), loginInfo) finder = DavResourceFinder(InstrumentationRegistry.getInstrumentation().targetContext, loginInfo) client = HttpClient.Builder() .addAuthentication(null, loginInfo.credentials) Loading