This repository was archived by the owner on Mar 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
src/test/java/com/owncloud/android/lib Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1
1
android.enableJetifier =true
2
2
android.useAndroidX =true
3
3
org.gradle.jvmargs =-Xmx1536M
4
+ <<<<<<< HEAD
5
+ =======
6
+ android.enableUnitTestBinaryResources =true
7
+ >>>>>>> use robolectric for android tests
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ dependencies {
15
15
kapt " com.squareup.moshi:moshi-kotlin-codegen:$moshiVersion "
16
16
17
17
testImplementation ' junit:junit:4.13.2'
18
+ testImplementation ' org.robolectric:robolectric:4.3.1'
18
19
}
19
20
20
21
android {
@@ -37,4 +38,10 @@ android {
37
38
sourceCompatibility JavaVersion . VERSION_1_8
38
39
targetCompatibility JavaVersion . VERSION_1_8
39
40
}
41
+
42
+ testOptions {
43
+ unitTests {
44
+ includeAndroidResources = true
45
+ }
46
+ }
40
47
}
Original file line number Diff line number Diff line change 1
1
package com.owncloud.android.lib
2
2
3
3
import android.net.Uri
4
+ import android.os.Build
4
5
import com.owncloud.android.lib.resources.status.GetRemoteStatusOperation
5
6
import com.owncloud.android.lib.resources.status.HttpScheme.HTTPS_PREFIX
6
7
import com.owncloud.android.lib.resources.status.HttpScheme.HTTP_PREFIX
7
8
import org.junit.Assert.assertEquals
8
9
import org.junit.Assert.assertFalse
9
10
import org.junit.Assert.assertTrue
10
11
import org.junit.Test
12
+ import org.junit.runner.RunWith
13
+ import org.robolectric.RobolectricTestRunner
14
+ import org.robolectric.annotation.Config
11
15
16
+ @RunWith(RobolectricTestRunner ::class )
17
+ @Config(sdk = [Build .VERSION_CODES .O_MR1 ])
12
18
class GetRemoteStatusOperationTest {
13
19
14
20
@Test
You can’t perform that action at this time.
0 commit comments