Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Need actual implementations for JVM
Browse files Browse the repository at this point in the history
  • Loading branch information
nategbrown9 committed Dec 1, 2023
1 parent c2aa70c commit e09dba9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.sagebionetworks.bridge.kmm.shared

import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.runBlocking

actual abstract class BaseTest actual constructor() {

actual fun <T> runTest(block: suspend CoroutineScope.() -> T) {
runBlocking { block() }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.sagebionetworks.bridge.kmm.shared

import app.cash.sqldelight.db.SqlDriver
import app.cash.sqldelight.driver.jdbc.sqlite.JdbcSqliteDriver
import org.sagebionetworks.bridge.kmm.shared.cache.BridgeResourceDatabase
import java.util.UUID

internal actual fun testDatabaseDriver(): SqlDriver {
return JdbcSqliteDriver(JdbcSqliteDriver.IN_MEMORY).apply {
BridgeResourceDatabase.Schema.create(this)
}
}

internal actual fun randomUUID() = UUID.randomUUID().toString()

0 comments on commit e09dba9

Please sign in to comment.