Add intention to replace snake-case test function name with a space-separated

#KT-27143 Fixed
This commit is contained in:
Toshiaki Kameyama
2018-12-26 20:53:15 +09:00
committed by Mikhail Glukhikh
parent 5226ea5cda
commit 98810ba750
11 changed files with 168 additions and 50 deletions
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.intentions.ConvertSnakeCaseTestFunctionToSpacedIntention
@@ -0,0 +1,8 @@
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
// IS_APPLICABLE: false
import org.junit.Test
class A {
@Test fun <caret>testTwoPlusTwoEqualsFour() {}
}
@@ -0,0 +1,10 @@
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import org.junit.Test
class A {
@Test fun <caret>test_two_plus_two_equals_four() {}
}
fun test() {
A().test_two_plus_two_equals_four()
}
@@ -0,0 +1,10 @@
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import org.junit.Test
class A {
@Test fun `test two plus two equals four`() {}
}
fun test() {
A().`test two plus two equals four`()
}