idea-plugin / arrow.meta.ide.testing.env

Package arrow.meta.ide.testing.env

Types

IdeTestSetUp This is the entry point for Test classes JUnit initializes the Test Environment and registers your custom ide-plugin. This empty abstract class is needed, as the underlying TestFramework may change for future versions. Please note, that this set up is solely for light UI tests, that don’t require a build environment or generated sources. In those cases, one may supply one of the HeavyIdeaTests or Testcase the one in our test directory for gradle.abstract class IdeTestSetUp : LightPlatformCodeInsightFixture4TestCase
IdeTestTypeSyntax IdeTestTypeSyntax ensures that each TestType is within an Idea instance and provides Tooling from IntelliJ’s Testing Environmentinterface IdeTestTypeSyntax
TestFile data class TestFile

Extensions for External Classes

kotlin.String  

Functions

ideTest This extension runs each test for selected editor features. Each Test class has to extend IdeTestSetUp, in order to spin-up the underlying Intellij Testing Platform at runtime. That also insures that the property myFixture is properly instantiated.fun <F : IdeSyntax, A> ideTest(myFixture: CodeInsightTestFixture, ctx: F = IdeEnvironment as F, tests: IdeEnvironment.() -> List<IdeTest<F, A>>): Unit
interpreter The default interpreter evaluates and prints the actual result A on the console. In addition, it throws an AssertionError with the ideTest.result.message, whenever the expected ideTest.result doesn’t match the actual result from testResult.fun <F : IdeSyntax, A> interpreter(ideTest: IdeTest<F, A>, ctx: F, fixture: CodeInsightTestFixture): Unit
runTest runTest executes the test with a custom interpreter, which facilitates to run a test in any environment, based on a plugin context F. Hence, the Testing DSL for IntelliJ supports pure or impure Test environments and allows to compose them in a variety of testing methods such as property-based testing, unit tests and many more.fun <F : IdeSyntax, A> IdeTest<F, A>.runTest(fixture: CodeInsightTestFixture, ctx: F, interpreter: (test: IdeTest<F, A>, ctx: F, fixture: CodeInsightTestFixture) -> Unit = ::interpreter): Unit
testResult testResult evaluates the actual result within the IdeEnvironmentfun <F : IdeSyntax, A> IdeTest<F, A>.testResult(ctx: F, fixture: CodeInsightTestFixture): A

Do you like Arrow?

Arrow Org
<