mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-09-18 14:59:24 +00:00
Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
4ee67321c4 | |||
59f1f2e59b | |||
0766d48b7c | |||
e18903b9e9 | |||
d0eecdead2 | |||
cc4a83a033 | |||
1cf911bbde | |||
36d73d5023 | |||
c395242e3e | |||
cd9cd7cc5d |
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.16.0
|
||||||
|
|
||||||
|
* `Versions`:
|
||||||
|
* `Ktor`: `2.1.3` -> `2.2.1`
|
||||||
|
* `Android Fragment`: `1.5.3` -> `1.5.5`
|
||||||
|
|
||||||
## 0.15.1
|
## 0.15.1
|
||||||
|
|
||||||
* `Startup`:
|
* `Startup`:
|
||||||
|
@@ -14,5 +14,5 @@ crypto_js_version=4.1.1
|
|||||||
# Project data
|
# Project data
|
||||||
|
|
||||||
group=dev.inmo
|
group=dev.inmo
|
||||||
version=0.15.1
|
version=0.16.0
|
||||||
android_code_version=167
|
android_code_version=168
|
||||||
|
@@ -13,19 +13,19 @@ jb-dokka = "1.7.20"
|
|||||||
klock = "3.4.0"
|
klock = "3.4.0"
|
||||||
uuid = "0.6.0"
|
uuid = "0.6.0"
|
||||||
|
|
||||||
ktor = "2.1.3"
|
ktor = "2.2.1"
|
||||||
|
|
||||||
gh-release = "2.4.1"
|
gh-release = "2.4.1"
|
||||||
|
|
||||||
koin = "3.2.2"
|
koin = "3.2.2"
|
||||||
|
|
||||||
android-gradle = "7.2.2"
|
android-gradle = "7.3.0"
|
||||||
dexcount = "3.1.0"
|
dexcount = "3.1.0"
|
||||||
|
|
||||||
android-coreKtx = "1.9.0"
|
android-coreKtx = "1.9.0"
|
||||||
android-recyclerView = "1.2.1"
|
android-recyclerView = "1.2.1"
|
||||||
android-appCompat = "1.5.1"
|
android-appCompat = "1.5.1"
|
||||||
android-fragment = "1.5.3"
|
android-fragment = "1.5.5"
|
||||||
android-espresso = "3.4.0"
|
android-espresso = "3.4.0"
|
||||||
android-test = "1.1.3"
|
android-test = "1.1.3"
|
||||||
|
|
||||||
|
@@ -13,11 +13,16 @@ kotlin {
|
|||||||
api internalProject("micro_utils.startup.plugin")
|
api internalProject("micro_utils.startup.plugin")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
jvmTest {
|
||||||
|
dependencies {
|
||||||
|
implementation libs.kt.coroutines.test
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
application {
|
application {
|
||||||
mainClassName = "dev.inmo.micro_utils.startup.launcher.ServerLauncherKt"
|
mainClassName = "dev.inmo.micro_utils.startup.launcher.MainKt"
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
|
@@ -4,32 +4,39 @@ import dev.inmo.micro_utils.startup.launcher.HelloWorldPlugin
|
|||||||
import dev.inmo.micro_utils.startup.launcher.defaultJson
|
import dev.inmo.micro_utils.startup.launcher.defaultJson
|
||||||
import dev.inmo.micro_utils.startup.launcher.start
|
import dev.inmo.micro_utils.startup.launcher.start
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
import kotlinx.coroutines.test.runTest
|
||||||
import kotlinx.serialization.json.jsonObject
|
import kotlinx.serialization.json.jsonObject
|
||||||
|
import org.koin.core.context.GlobalContext
|
||||||
|
import kotlin.test.BeforeTest
|
||||||
import kotlin.test.Test
|
import kotlin.test.Test
|
||||||
|
|
||||||
class StartupLaunchingTests {
|
class StartupLaunchingTests {
|
||||||
@Test(timeout = 1000L)
|
@BeforeTest
|
||||||
|
fun resetGlobalKoinContext() {
|
||||||
|
kotlin.runCatching { GlobalContext.stopKoin() }
|
||||||
|
}
|
||||||
|
@Test(timeout = 60000L)
|
||||||
fun CheckThatEmptyPluginsListLeadsToEndOfMain() {
|
fun CheckThatEmptyPluginsListLeadsToEndOfMain() {
|
||||||
val emptyJson = defaultJson.encodeToJsonElement(
|
val emptyJson = defaultJson.encodeToJsonElement(
|
||||||
Config.serializer(),
|
Config.serializer(),
|
||||||
Config(emptyList())
|
Config(emptyList())
|
||||||
).jsonObject
|
).jsonObject
|
||||||
|
|
||||||
launchSynchronously {
|
runTest {
|
||||||
val job = launch {
|
val job = launch {
|
||||||
start(emptyJson)
|
start(emptyJson)
|
||||||
}
|
}
|
||||||
job.join()
|
job.join()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@Test(timeout = 1000L)
|
@Test(timeout = 60000L)
|
||||||
fun CheckThatHelloWorldPluginsListLeadsToEndOfMain() {
|
fun CheckThatHelloWorldPluginsListLeadsToEndOfMain() {
|
||||||
val emptyJson = defaultJson.encodeToJsonElement(
|
val emptyJson = defaultJson.encodeToJsonElement(
|
||||||
Config.serializer(),
|
Config.serializer(),
|
||||||
Config(listOf(HelloWorldPlugin))
|
Config(listOf(HelloWorldPlugin))
|
||||||
).jsonObject
|
).jsonObject
|
||||||
|
|
||||||
launchSynchronously {
|
runTest {
|
||||||
val job = launch {
|
val job = launch {
|
||||||
start(emptyJson)
|
start(emptyJson)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user