Skip to content

Commit 7318d0c

Browse files
committed
fix tests
1 parent ab34c78 commit 7318d0c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererTestBase.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ open class CodeWhispererTestBase {
127127
onGeneric {
128128
getRequestContext(any(), any(), any(), any(), any())
129129
} doAnswer {
130-
aRequestContext(projectRule.project)
130+
aRequestContext(projectRule.project, projectRule.fixture.editor)
131131
}
132132
}
133133
ApplicationManager.getApplication().replaceService(CodeWhispererService::class.java, codewhispererService, disposableRule.disposable)

plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererTestUtil.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
package software.aws.toolkits.jetbrains.services.codewhisperer
55

6+
import com.intellij.openapi.editor.Editor
67
import com.intellij.openapi.project.Project
78
import org.eclipse.lsp4j.jsonrpc.messages.Either
8-
import org.mockito.kotlin.mock
99
import software.amazon.awssdk.awscore.DefaultAwsResponseMetadata
1010
import software.amazon.awssdk.awscore.util.AwsHeader
1111
import software.amazon.awssdk.http.SdkHttpResponse
@@ -133,6 +133,7 @@ fun aTriggerType(): CodewhispererTriggerType =
133133

134134
fun aRequestContext(
135135
project: Project,
136+
editor: Editor,
136137
myFileContextInfo: FileContextInfo? = null,
137138
): RequestContext {
138139
val triggerType = aTriggerType()
@@ -149,7 +150,7 @@ fun aRequestContext(
149150

150151
return RequestContext(
151152
project,
152-
mock(),
153+
editor,
153154
TriggerTypeInfo(triggerType, automatedTriggerType),
154155
CaretPosition(Random.nextInt(), Random.nextInt()),
155156
fileContextInfo = myFileContextInfo ?: aFileContextInfo(),

0 commit comments

Comments
 (0)