mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
42 lines
1.1 KiB
Kotlin
42 lines
1.1 KiB
Kotlin
package com.intellij.configurationScript
|
|
|
|
import com.intellij.execution.ShortenCommandLine
|
|
import com.intellij.execution.application.JvmMainMethodRunConfigurationOptions
|
|
import com.intellij.testFramework.ProjectRule
|
|
import org.assertj.core.api.Assertions.assertThat
|
|
import org.junit.ClassRule
|
|
import org.junit.Test
|
|
|
|
class JavaPropertyValueReaderTest {
|
|
companion object {
|
|
@JvmField
|
|
@ClassRule
|
|
val projectRule = ProjectRule()
|
|
}
|
|
|
|
@Test
|
|
fun `enum`() {
|
|
val result = collectRunConfigurations("""
|
|
runConfigurations:
|
|
java:
|
|
shortenClasspath: MANIFEST
|
|
""")
|
|
val options = JvmMainMethodRunConfigurationOptions()
|
|
options.shortenClasspath = ShortenCommandLine.MANIFEST
|
|
assertThat(result).containsExactly(options)
|
|
}
|
|
|
|
@Test
|
|
fun map() {
|
|
val result = collectRunConfigurations("""
|
|
runConfigurations:
|
|
java:
|
|
env:
|
|
foo: bar
|
|
answer: 42
|
|
""")
|
|
val options = JvmMainMethodRunConfigurationOptions()
|
|
options.env = linkedMapOf("foo" to "bar", "answer" to "42")
|
|
assertThat(result).containsExactly(options)
|
|
}
|
|
} |