Code insight: "Generate..." actions for test framework support methods

#KT-9355 Fixed
This commit is contained in:
Alexey Sedunov
2015-09-30 17:26:59 +03:00
parent 5a325aeec0
commit 730cc7b551
45 changed files with 941 additions and 2 deletions
@@ -0,0 +1,5 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$Data
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
class A {<caret>
}
@@ -0,0 +1,10 @@
import org.junit.runners.Parameterized
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$Data
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
class A {
@Parameterized.Parameters
fun data(): Collection<Array<Any>> {
throw UnsupportedOperationException()
}
}
@@ -0,0 +1,5 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$SetUp
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
class A {<caret>
}
@@ -0,0 +1,10 @@
import org.junit.Before
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$SetUp
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
class A {
@Before
fun setUp() {
throw UnsupportedOperationException()
}
}
@@ -0,0 +1,10 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$SetUp
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import org.junit.Before
class A {<caret>
@Before
fun setUp() {
throw UnsupportedOperationException()
}
}
@@ -0,0 +1,15 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$SetUp
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import org.junit.Before
class A {
@org.testng.annotations.BeforeMethod
fun setUp() {
throw UnsupportedOperationException()
}
@Before
fun setUp() {
throw UnsupportedOperationException()
}
}
@@ -0,0 +1,11 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$SetUp
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
open class A {
open fun setUp() {
}
}
class B : A() {<caret>
}
@@ -0,0 +1,16 @@
import org.junit.Before
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$SetUp
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
open class A {
open fun setUp() {
}
}
class B : A() {
@Before
override fun setUp() {
super.setUp()
}
}
@@ -0,0 +1,5 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$TearDown
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
class A {<caret>
}
@@ -0,0 +1,10 @@
import org.junit.After
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$TearDown
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
class A {
@After
fun tearDown() {
throw UnsupportedOperationException()
}
}
@@ -0,0 +1,10 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$TearDown
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import org.junit.After
class A {<caret>
@After
fun tearDown() {
throw UnsupportedOperationException()
}
}
@@ -0,0 +1,15 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$TearDown
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import org.junit.After
class A {
@org.testng.annotations.AfterMethod
fun tearDown() {
throw UnsupportedOperationException()
}
@After
fun tearDown() {
throw UnsupportedOperationException()
}
}
@@ -0,0 +1,5 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$Test
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
class A {<caret>
}
@@ -0,0 +1,10 @@
import org.junit.Test
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$Test
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
class A {
@Test
fun testName() {
throw UnsupportedOperationException()
}
}