mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[lambda tests] AT-3508 Name test class conventionally
GitOrigin-RevId: e5965939d311d9d680bd9bddb2686def6507aa7a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
32b94df9e7
commit
22db5e900b
@@ -2,8 +2,6 @@ package com.intellij.lambda.tests
|
||||
|
||||
import com.intellij.lambda.testFramework.junit.ExecuteInMonolithAndSplitMode
|
||||
import com.intellij.lambda.testFramework.utils.BackgroundRunWithLambda
|
||||
import com.intellij.lambda.tests.SampleTests.Companion.HelloBackendOnlyLambda
|
||||
import com.intellij.lambda.tests.SampleTests.Companion.HelloFrontendOnlyLambda
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.TestInfo
|
||||
|
||||
+12
-14
@@ -18,7 +18,7 @@ import org.junit.jupiter.api.TestTemplate
|
||||
import kotlin.time.Duration.Companion.seconds
|
||||
|
||||
@ExecuteInMonolithAndSplitMode
|
||||
class SampleTests {
|
||||
class SampleTest {
|
||||
@TestTemplate
|
||||
fun `serialized test`(ide: BackgroundRunWithLambda) = runBlocking {
|
||||
//works in both modes if
|
||||
@@ -46,21 +46,19 @@ class SampleTests {
|
||||
ide.runLambdaInBackend(HelloBackendOnlyLambda::class)
|
||||
ide.runLambda(HelloFrontendOnlyLambda::class)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
class HelloFrontendOnlyLambda(frontendIdeContext: LambdaFrontendContext, plugin: PluginModuleDescriptor)
|
||||
: NamedLambda<LambdaFrontendContext>(frontendIdeContext, plugin) {
|
||||
override suspend fun LambdaFrontendContext.lambda(args: List<LambdaRdKeyValueEntry>): Any {
|
||||
return currentClassLogger().warn("Hi there Frontend")
|
||||
}
|
||||
}
|
||||
class HelloFrontendOnlyLambda(frontendIdeContext: LambdaFrontendContext, plugin: PluginModuleDescriptor)
|
||||
: NamedLambda<LambdaFrontendContext>(frontendIdeContext, plugin) {
|
||||
override suspend fun LambdaFrontendContext.lambda(args: List<LambdaRdKeyValueEntry>): Any {
|
||||
return currentClassLogger().warn("Hi there Frontend")
|
||||
}
|
||||
}
|
||||
|
||||
class HelloBackendOnlyLambda(backendIdeContext: LambdaBackendContext, plugin: PluginModuleDescriptor)
|
||||
: NamedLambda<LambdaBackendContext>(backendIdeContext, plugin) {
|
||||
override suspend fun LambdaBackendContext.lambda(args: List<LambdaRdKeyValueEntry>): Any {
|
||||
return currentClassLogger().warn("Hi there Backend")
|
||||
}
|
||||
}
|
||||
class HelloBackendOnlyLambda(backendIdeContext: LambdaBackendContext, plugin: PluginModuleDescriptor)
|
||||
: NamedLambda<LambdaBackendContext>(backendIdeContext, plugin) {
|
||||
override suspend fun LambdaBackendContext.lambda(args: List<LambdaRdKeyValueEntry>): Any {
|
||||
return currentClassLogger().warn("Hi there Backend")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user