forked from fwcd/kotlin-language-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGradleDSLScriptTest.kt
More file actions
24 lines (19 loc) · 886 Bytes
/
Copy pathGradleDSLScriptTest.kt
File metadata and controls
24 lines (19 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package org.javacs.kt
import org.junit.Test
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.*
class GradleDSLScriptTest : SingleFileTestFixture("kotlinDSLWorkspace", "build.gradle.kts", Configuration().apply {
scripts.enabled = true
scripts.buildScriptsEnabled = true
}) {
@Test fun `edit repositories`() {
val completions = languageServer.textDocumentService.completion(completionParams(file, 7, 13)).get().right!!
val labels = completions.items.map { it.label }
assertThat(labels, hasItem("repositories"))
}
@Test fun `hover plugin`() {
val hover = languageServer.textDocumentService.hover(hoverParams(file, 4, 8)).get()!!
val contents = hover.contents.right
assertThat(contents.value, containsString("fun PluginDependenciesSpec.kotlin(module: String): PluginDependencySpec"))
}
}