All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmTest.io.ipfs.kotlin.BaseIPFSWebserverTest.kt Maven / Gradle / Ivy

package io.ipfs.kotlin

import io.ipfs.kotlin.defaults.localIPFSConfig
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before

abstract class BaseIPFSWebserverTest {

    val server = MockWebServer()
    val ipfs: IPFS by lazy {
        IPFS(localIPFSConfig.copy(base_url = server.url("").toString()))
    }

    @Before
    fun runBeforeEveryTest() {
        server.start()

    }

    @After
    fun runAfterEveryTest() {
        server.shutdown()
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy