From 22db5e900b9493d19f80093ef97ffac2d4a2c9cb Mon Sep 17 00:00:00 2001 From: Nikita Kudrin Date: Mon, 10 Nov 2025 17:38:02 +0200 Subject: [PATCH] [lambda tests] AT-3508 Name test class conventionally GitOrigin-RevId: e5965939d311d9d680bd9bddb2686def6507aa7a --- .../intellij/lambda/tests/MixedExampleTest.kt | 2 -- .../tests/{SampleTests.kt => SampleTest.kt} | 26 +++++++++---------- 2 files changed, 12 insertions(+), 16 deletions(-) rename tools/intellij.lambda.tests/tests/com/intellij/lambda/tests/{SampleTests.kt => SampleTest.kt} (71%) diff --git a/tools/intellij.lambda.tests/tests/com/intellij/lambda/tests/MixedExampleTest.kt b/tools/intellij.lambda.tests/tests/com/intellij/lambda/tests/MixedExampleTest.kt index 5f1e36ce534f..b35281a11af1 100644 --- a/tools/intellij.lambda.tests/tests/com/intellij/lambda/tests/MixedExampleTest.kt +++ b/tools/intellij.lambda.tests/tests/com/intellij/lambda/tests/MixedExampleTest.kt @@ -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 diff --git a/tools/intellij.lambda.tests/tests/com/intellij/lambda/tests/SampleTests.kt b/tools/intellij.lambda.tests/tests/com/intellij/lambda/tests/SampleTest.kt similarity index 71% rename from tools/intellij.lambda.tests/tests/com/intellij/lambda/tests/SampleTests.kt rename to tools/intellij.lambda.tests/tests/com/intellij/lambda/tests/SampleTest.kt index 35805fe1065b..b621e5f2889e 100644 --- a/tools/intellij.lambda.tests/tests/com/intellij/lambda/tests/SampleTests.kt +++ b/tools/intellij.lambda.tests/tests/com/intellij/lambda/tests/SampleTest.kt @@ -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(frontendIdeContext, plugin) { - override suspend fun LambdaFrontendContext.lambda(args: List): Any { - return currentClassLogger().warn("Hi there Frontend") - } - } +class HelloFrontendOnlyLambda(frontendIdeContext: LambdaFrontendContext, plugin: PluginModuleDescriptor) + : NamedLambda(frontendIdeContext, plugin) { + override suspend fun LambdaFrontendContext.lambda(args: List): Any { + return currentClassLogger().warn("Hi there Frontend") + } +} - class HelloBackendOnlyLambda(backendIdeContext: LambdaBackendContext, plugin: PluginModuleDescriptor) - : NamedLambda(backendIdeContext, plugin) { - override suspend fun LambdaBackendContext.lambda(args: List): Any { - return currentClassLogger().warn("Hi there Backend") - } - } +class HelloBackendOnlyLambda(backendIdeContext: LambdaBackendContext, plugin: PluginModuleDescriptor) + : NamedLambda(backendIdeContext, plugin) { + override suspend fun LambdaBackendContext.lambda(args: List): Any { + return currentClassLogger().warn("Hi there Backend") } }