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()
}
}
@@ -0,0 +1,7 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$SetUp
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import junit.framework.TestCase
class A : TestCase() {<caret>
}
@@ -0,0 +1,9 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$SetUp
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import junit.framework.TestCase
class A : TestCase() {
override fun setUp() {
super.setUp()
}
}
@@ -0,0 +1,10 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$SetUp
// NOT_APPLICABLE
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import junit.framework.TestCase
class A : TestCase() {<caret>
override fun setUp() {
super.setUp()
}
}
@@ -0,0 +1,7 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$TearDown
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import junit.framework.TestCase
class A : TestCase() {<caret>
}
@@ -0,0 +1,9 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$TearDown
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import junit.framework.TestCase
class A : TestCase() {
override fun tearDown() {
super.tearDown()
}
}
@@ -0,0 +1,10 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$TearDown
// NOT_APPLICABLE
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import junit.framework.TestCase
class A : TestCase() {<caret>
override fun tearDown() {
super.tearDown()
}
}
@@ -0,0 +1,7 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$Test
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import junit.framework.TestCase
class A : TestCase() {<caret>
}
@@ -0,0 +1,9 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$Test
// CONFIGURE_LIBRARY: JUnit@lib/junit-4.12.jar
import junit.framework.TestCase
class A : TestCase() {
fun testName() {
throw UnsupportedOperationException()
}
}
@@ -0,0 +1,7 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$Data
// CONFIGURE_LIBRARY: TestNG@plugins/testng/lib/testng.jar
import org.testng.annotations.Test
@Test class A {<caret>
}
@@ -0,0 +1,11 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$Data
// CONFIGURE_LIBRARY: TestNG@plugins/testng/lib/testng.jar
import org.testng.annotations.DataProvider
import org.testng.annotations.Test
@Test class A {
@DataProvider(name = "Name")
fun Name(): Array<Array<Any>> {
throw UnsupportedOperationException()
}
}
@@ -0,0 +1,7 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$SetUp
// CONFIGURE_LIBRARY: TestNG@plugins/testng/lib/testng.jar
import org.testng.annotations.Test
@Test class A {<caret>
}
@@ -0,0 +1,11 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$SetUp
// CONFIGURE_LIBRARY: TestNG@plugins/testng/lib/testng.jar
import org.testng.annotations.BeforeMethod
import org.testng.annotations.Test
@Test class A {
@BeforeMethod
fun setUp() {
throw UnsupportedOperationException()
}
}
@@ -0,0 +1,12 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$SetUp
// NOT_APPLICABLE
// CONFIGURE_LIBRARY: TestNG@plugins/testng/lib/testng.jar
import org.testng.annotations.BeforeMethod
import org.testng.annotations.Test
@Test class A {<caret>
@BeforeMethod
fun setUp() {
throw UnsupportedOperationException()
}
}
@@ -0,0 +1,13 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$SetUp
// CONFIGURE_LIBRARY: TestNG@plugins/testng/lib/testng.jar
import org.testng.annotations.Test
open class A {
open fun setUp() {
}
}
@Test class B : A() {<caret>
}
@@ -0,0 +1,17 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$SetUp
// CONFIGURE_LIBRARY: TestNG@plugins/testng/lib/testng.jar
import org.testng.annotations.BeforeMethod
import org.testng.annotations.Test
open class A {
open fun setUp() {
}
}
@Test class B : A() {
@BeforeMethod
override fun setUp() {
super.setUp()
}
}
@@ -0,0 +1,7 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$TearDown
// CONFIGURE_LIBRARY: TestNG@plugins/testng/lib/testng.jar
import org.testng.annotations.Test
@Test class A {<caret>
}
@@ -0,0 +1,11 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$TearDown
// CONFIGURE_LIBRARY: TestNG@plugins/testng/lib/testng.jar
import org.testng.annotations.AfterMethod
import org.testng.annotations.Test
@Test class A {
@AfterMethod
fun tearDown() {
throw UnsupportedOperationException()
}
}
@@ -0,0 +1,12 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$TearDown
// NOT_APPLICABLE
// CONFIGURE_LIBRARY: TestNG@plugins/testng/lib/testng.jar
import org.testng.annotations.AfterMethod
import org.testng.annotations.Test
@Test class A {<caret>
@AfterMethod
fun tearDown() {
throw UnsupportedOperationException()
}
}
@@ -0,0 +1,7 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$Test
// CONFIGURE_LIBRARY: TestNG@plugins/testng/lib/testng.jar
import org.testng.annotations.Test
@Test class A {<caret>
}
@@ -0,0 +1,10 @@
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$Test
// CONFIGURE_LIBRARY: TestNG@plugins/testng/lib/testng.jar
import org.testng.annotations.Test
@Test class A {
@Test
fun testName() {
throw UnsupportedOperationException()
}
}