You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: java/src/main/kotlin/cc/unitmesh/idea/provider/JavaTestContextProvider.kt
+15-2Lines changed: 15 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -28,15 +28,15 @@ open class JavaTestContextProvider : ChatContextProvider {
28
28
29
29
val isSpringRelated = creationContext.element?.let { isSpringRelated(it) } ?:false
30
30
31
-
val baseTestPrompt ="""
31
+
var baseTestPrompt ="""
32
32
|You MUST use should_xx_xx style for test method name.
33
33
|You MUST use given-when-then style.
34
34
|- Test file should be complete and compilable, without need for further actions.
35
35
|- Ensure that each test focuses on a single use case to maintain clarity and readability.
36
36
|- Instead of using `@BeforeEach` methods for setup, include all necessary code initialization within each individual test method, do not write parameterized tests.
37
37
|""".trimMargin()
38
38
39
-
// todo: check is spring project
39
+
baseTestPrompt += junitRule(project)
40
40
41
41
items +=when {
42
42
isController && isSpringRelated -> {
@@ -64,6 +64,19 @@ open class JavaTestContextProvider : ChatContextProvider {
0 commit comments