Skip to content

Commit 4177d36

Browse files
authored
Re-enable AwsSettingsConfigurableTest on windows (#2442)
1 parent df467ff commit 4177d36

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

jetbrains-core/tst/software/aws/toolkits/jetbrains/settings/AwsSettingsConfigurableTest.kt

+4-19
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ package software.aws.toolkits.jetbrains.settings
66
import com.intellij.openapi.options.ConfigurationException
77
import com.intellij.openapi.util.SystemInfo
88
import com.intellij.testFramework.ProjectRule
9-
import org.junit.Assume
10-
import org.junit.Before
9+
import org.assertj.core.api.Assertions.assertThatThrownBy
1110
import org.junit.Rule
1211
import org.junit.Test
13-
import org.junit.rules.ExpectedException
1412
import software.aws.toolkits.jetbrains.services.lambda.sam.SamCommonTestUtils
1513
import java.nio.file.Path
1614

@@ -20,18 +18,6 @@ class AwsSettingsConfigurableTest : ExecutableDetectorTestBase() {
2018
@Rule
2119
val projectRule = ProjectRule()
2220

23-
@JvmField
24-
@Rule
25-
val expectedException: ExpectedException = ExpectedException.none()
26-
27-
@Before
28-
override fun setUp() {
29-
// TODO: Make the tests work on Windows
30-
Assume.assumeFalse(SystemInfo.isWindows)
31-
32-
super.setUp()
33-
}
34-
3521
@Test
3622
fun validate_ok_noOp() {
3723
val settings = AwsSettingsConfigurable(projectRule.project)
@@ -88,11 +74,10 @@ class AwsSettingsConfigurableTest : ExecutableDetectorTestBase() {
8874
val settings = AwsSettingsConfigurable(projectRule.project)
8975
settings.apply()
9076

91-
// use a rule instead of the annotation to ensure that test passes
92-
// only if exception is thrown on the second invocation of `apply`
9377
settings.samExecutablePath.text = sam.toAbsolutePath().toString()
94-
expectedException.expect(ConfigurationException::class.java)
95-
settings.apply()
78+
assertThatThrownBy {
79+
settings.apply()
80+
}.isInstanceOf(ConfigurationException::class.java)
9681
}
9782

9883
@Test

0 commit comments

Comments
 (0)