File tree 1 file changed +4
-19
lines changed
jetbrains-core/tst/software/aws/toolkits/jetbrains/settings
1 file changed +4
-19
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,9 @@ package software.aws.toolkits.jetbrains.settings
6
6
import com.intellij.openapi.options.ConfigurationException
7
7
import com.intellij.openapi.util.SystemInfo
8
8
import com.intellij.testFramework.ProjectRule
9
- import org.junit.Assume
10
- import org.junit.Before
9
+ import org.assertj.core.api.Assertions.assertThatThrownBy
11
10
import org.junit.Rule
12
11
import org.junit.Test
13
- import org.junit.rules.ExpectedException
14
12
import software.aws.toolkits.jetbrains.services.lambda.sam.SamCommonTestUtils
15
13
import java.nio.file.Path
16
14
@@ -20,18 +18,6 @@ class AwsSettingsConfigurableTest : ExecutableDetectorTestBase() {
20
18
@Rule
21
19
val projectRule = ProjectRule ()
22
20
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
-
35
21
@Test
36
22
fun validate_ok_noOp () {
37
23
val settings = AwsSettingsConfigurable (projectRule.project)
@@ -88,11 +74,10 @@ class AwsSettingsConfigurableTest : ExecutableDetectorTestBase() {
88
74
val settings = AwsSettingsConfigurable (projectRule.project)
89
75
settings.apply ()
90
76
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`
93
77
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)
96
81
}
97
82
98
83
@Test
You can’t perform that action at this time.
0 commit comments