mirror of
https://github.com/jlengrand/ExtraTestModuleExample.git
synced 2026-03-10 08:21:18 +00:00
Class def not found error
This commit is contained in:
@@ -4,6 +4,7 @@ plugins {
|
||||
alias(libs.plugins.kotlinMultiplatform)
|
||||
alias(libs.plugins.composeMultiplatform)
|
||||
alias(libs.plugins.composeCompiler)
|
||||
alias(libs.plugins.serialization)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
@@ -34,6 +35,10 @@ kotlin {
|
||||
implementation(compose.components.uiToolingPreview)
|
||||
implementation(libs.androidx.lifecycle.viewmodel)
|
||||
implementation(libs.androidx.lifecycle.runtime.compose)
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0")
|
||||
implementation(libs.kbsky.core)
|
||||
|
||||
|
||||
}
|
||||
|
||||
desktopMain.dependencies {
|
||||
|
||||
@@ -2,6 +2,8 @@ package nl.lengrand
|
||||
|
||||
import org.junit.jupiter.api.Assertions.*
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.assertThrows
|
||||
import work.socialhub.kbsky.ATProtocolException
|
||||
|
||||
class GreetingTest {
|
||||
@Test
|
||||
@@ -10,4 +12,9 @@ class GreetingTest {
|
||||
assertEquals("Hello, you!", Greeting().greet())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun connect(){
|
||||
assertThrows<ATProtocolException> { Greeting().connect() }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,30 @@
|
||||
package nl.lengrand
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import work.socialhub.kbsky.BlueskyFactory
|
||||
import work.socialhub.kbsky.api.entity.com.atproto.server.ServerCreateSessionRequest
|
||||
import work.socialhub.kbsky.domain.Service
|
||||
|
||||
@Serializable
|
||||
data class User (val name: String)
|
||||
|
||||
class Greeting {
|
||||
private val platform = getPlatform()
|
||||
|
||||
fun greet(): String {
|
||||
return "Hello, you!"
|
||||
return "Hello, ${User("you").name}!"
|
||||
}
|
||||
|
||||
fun connect(){
|
||||
val response = BlueskyFactory
|
||||
.instance(Service.BSKY_SOCIAL.uri)
|
||||
.server()
|
||||
.createSession(
|
||||
ServerCreateSessionRequest().also {
|
||||
it.identifier = "test"
|
||||
it.password = "tests"
|
||||
}
|
||||
)
|
||||
|
||||
println(response.data.accessJwt)}
|
||||
}
|
||||
@@ -2,6 +2,8 @@ package nl.lengrand
|
||||
|
||||
import org.junit.jupiter.api.Assertions.*
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.assertThrows
|
||||
import work.socialhub.kbsky.ATProtocolException
|
||||
|
||||
class GreetingTest {
|
||||
@Test
|
||||
@@ -10,4 +12,10 @@ class GreetingTest {
|
||||
assertEquals("Hello, you!", Greeting().greet())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun connect(){
|
||||
assertThrows<ATProtocolException> { Greeting().connect() }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user