Skip to content

Commit 9ad60ed

Browse files
committed
test(chat): migrate MessageViewTest to BasePlatformTestCase
- Update MessageViewTest to extend BasePlatformTestCase for better test isolation. - Rename test methods to follow naming conventions. - Adjust pluginSinceBuild to 223.* in gradle-223.properties. - Add RelatedClassesProvider import in AutoDevInputSection.kt.
1 parent 99bf0f9 commit 9ad60ed

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

core/src/main/kotlin/cc/unitmesh/devti/gui/chat/AutoDevInputSection.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import cc.unitmesh.devti.agent.model.CustomAgentConfig
77
import cc.unitmesh.devti.agent.model.CustomAgentState
88
import cc.unitmesh.devti.llms.tokenizer.Tokenizer
99
import cc.unitmesh.devti.llms.tokenizer.TokenizerFactory
10+
import cc.unitmesh.devti.provider.RelatedClassesProvider.Companion
1011
import cc.unitmesh.devti.settings.AutoDevSettingsState
1112
import com.intellij.codeInsight.lookup.LookupManagerListener
1213
import com.intellij.icons.AllIcons

core/src/test/kotlin/cc/unitmesh/devti/gui/chat/MessageViewTest.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package cc.unitmesh.devti.gui.chat
22

33
import com.intellij.temporary.gui.block.SimpleMessage
4+
import com.intellij.testFramework.fixtures.BasePlatformTestCase
45
import junit.framework.TestCase.assertEquals
56
import org.junit.Test
67

7-
class MessageViewTest {
8-
@Test
9-
fun should_parse_code_from_markdown_java_hello_world() {
8+
class MessageViewTest: BasePlatformTestCase() {
9+
fun testShould_parse_code_from_markdown_java_hello_world() {
1010
val markdown = """
1111
|complete code:
1212
|```java
@@ -34,8 +34,7 @@ class MessageViewTest {
3434
""".trimMargin())
3535
}
3636

37-
@Test
38-
fun should_spilt_three_parts_when_has_two_code_block() {
37+
fun testShould_spilt_three_parts_when_has_two_code_block() {
3938
val markdown = """
4039
|complete code:
4140
|```java

gradle-223.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
ideaVersion=IU-2022.3
66

77
# please see https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description
8-
pluginSinceBuild=221.*
8+
pluginSinceBuild=223.*
99
pluginUntilBuild=232.*
1010

1111
pythonPlugin=PythonCore:223.7571.182

0 commit comments

Comments
 (0)