Skip to content

Commit

Permalink
Muchos upgrades.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelhg committed Dec 10, 2020
1 parent 4887b1a commit b33be7b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions pom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ packaging: jar

parent: {groupId: org.sonatype.oss, artifactId: oss-parent, version: 9}

properties: {java.version: '11', kotlin.version: '1.3.21', jsoup.version: '1.11.3'}
properties: {java.version: '15', kotlin.version: '1.4.20', jsoup.version: '1.13.1'}

dependencies:
- {groupId: org.jsoup, artifactId: jsoup, version: "${jsoup.version}"}
- {groupId: org.jetbrains.kotlin, artifactId: kotlin-stdlib-jdk8, version: "${kotlin.version}"}
- {scope: test, groupId: org.junit.jupiter, artifactId: junit-jupiter-engine, version: 5.4.1}
- {scope: test, groupId: com.squareup.okhttp3, artifactId: mockwebserver, version: 3.9.1,
- {scope: test, groupId: org.junit.jupiter, artifactId: junit-jupiter-engine, version: 5.7.0}
- {scope: test, groupId: com.squareup.okhttp3, artifactId: mockwebserver, version: 4.9.0,
exclusions: [{groupId: org.bouncycastle, artifactId: '*'}]}

build:
Expand All @@ -29,4 +29,4 @@ build:
- {id: test-compile, phase: test-compile, goals: ['test-compile']}
- groupId: org.apache.maven.plugins
artifactId: maven-surefire-plugin
version: '3.0.0-M3'
version: '3.0.0-M5'
6 changes: 3 additions & 3 deletions src/test/kotlin/io/mikael/ksoup/test/util.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal class StaticDispatcher(private val resolver: (String) -> String?): Disp
private fun r(n: Int): MockResponse = MockResponse().setResponseCode(n)

override fun dispatch(request: RecordedRequest) =
resolver(request.path)
resolver(request.path!!)
?.let { resource(it) }
?.let { r(200).setBody(it.readText()) }
?: r(404)
Expand All @@ -49,15 +49,15 @@ open class StaticWebTest {
@BeforeEach
fun before() {
server = MockWebServer().apply {
this.setDispatcher(StaticDispatcher(staticContentResolver))
this.dispatcher = StaticDispatcher(staticContentResolver)
this.start()
}
}

@AfterEach
fun after() = server.close()

protected fun testUrl(path: String) = server.url(path)!!.toString()
protected fun testUrl(path: String) = server.url(path).toString()

protected fun assertRequestPath(path: String) = assertEquals(path, server.takeRequest().path)

Expand Down

0 comments on commit b33be7b

Please sign in to comment.