Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc77df0f authored by Ricki Hirner's avatar Ricki Hirner
Browse files

Use JUnit tests instead of instrumentation tests, when possible

parent 04250fef
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -9,8 +9,9 @@ cache:

test:
  script:
    - (cd /sdk/emulator; ./emulator @test -no-audio -no-window & wait-for-emulator.sh)
    - ./gradlew check connectedCheck
    #- (cd /sdk/emulator; ./emulator @test -no-audio -no-window & wait-for-emulator.sh)
    #- ./gradlew check connectedCheck
    - ./gradlew check
  artifacts:
    paths:
      - build/outputs/lint-results-debug.html
+1 −0
Original line number Diff line number Diff line
@@ -66,4 +66,5 @@ dependencies {
    testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
    testImplementation 'junit:junit:4.12'
    testImplementation "com.squareup.okhttp3:mockwebserver:$okhttp_version"
    testImplementation 'org.ogce:xpp3:1.1.6'    // XmlPullParser
}
+3 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ import okhttp3.*
import okhttp3.internal.http.StatusLine
import org.xmlpull.v1.XmlPullParser
import org.xmlpull.v1.XmlPullParserException
import java.io.EOFException
import java.io.IOException
import java.io.Reader
import java.io.StringWriter
@@ -287,7 +288,6 @@ open class DavResource @JvmOverloads constructor(
        serializer.setPrefix("CAL", XmlUtils.NS_CALDAV)
        serializer.setPrefix("CARD", XmlUtils.NS_CARDDAV)
        serializer.startDocument("UTF-8", null)
        serializer.setPrefix("", XmlUtils.NS_WEBDAV)
        serializer.startTag(XmlUtils.NS_WEBDAV, "propfind")
        serializer.startTag(XmlUtils.NS_WEBDAV, "prop")
        for (prop in reqProp) {
@@ -635,6 +635,8 @@ open class DavResource @JvmOverloads constructor(

            return response ?: throw DavException("Multi-Status response didn't contain <DAV:multistatus> root element")

        } catch (e: EOFException) {
            throw DavException("Incomplete Multi-Status XML", e)
        } catch (e: XmlPullParserException) {
            throw DavException("Couldn't parse Multi-Status XML", e)
        }
Loading