Package com.vladsch.plugin.test.util
Class LightPlatformCodeInsightFixtureSpecTestCase
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- com.intellij.testFramework.UsefulTestCase
-
- com.intellij.testFramework.fixtures.BasePlatformTestCase
-
- com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
-
- com.vladsch.plugin.test.util.LightPlatformCodeInsightFixtureSpecTestCase
-
- All Implemented Interfaces:
com.vladsch.flexmark.test.util.SpecExampleProcessor,CodeInsightFixtureSpecTestCase,SpecTest,junit.framework.Test
public abstract class LightPlatformCodeInsightFixtureSpecTestCase extends com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase implements CodeInsightFixtureSpecTestCase
-
-
Field Summary
Fields Modifier and Type Field Description @NotNull com.vladsch.flexmark.test.util.spec.SpecExamplemyExampleorg.junit.rules.ExpectedExceptionmyThrown-
Fields inherited from class com.intellij.testFramework.UsefulTestCase
IS_UNDER_SAFE_PUSH, IS_UNDER_TEAMCITY, LOG, OVERWRITE_TESTDATA, runBareTestRule, TEMP_DIR_MARKER
-
Fields inherited from interface com.vladsch.plugin.test.util.cases.CodeInsightFixtureSpecTestCase
BANNER_AFTER_ACTION, BANNER_AST, BANNER_AST_AFTER_ACTION, BANNER_AST_BEFORE_ACTION, BANNER_BEFORE_ACTION, BANNER_CLIPBOARD, BANNER_QUICK_FIXES, BANNER_RANGES, BANNER_SEGMENTS, EXCEPTION_MATCHER, TEST_CARET_MARKUP
-
Fields inherited from interface com.vladsch.plugin.test.util.cases.SpecTest
ADDITIONAL_PROJECT_FILES, ADDITIONAL_PROJECT_FILES_OPTION, CODE_STYLE_SETTINGS, CODE_STYLE_SETTINGS_OPTION, CUSTOM_OPTION, DEBUG_LOG_SETTINGS, DEBUG_LOG_SETTINGS_OPTION, EMBED_TIMED, EXAMPLE_SOURCE_EXTENSION, EXAMPLE_SOURCE_NAME, FAIL, IGNORE, LINE_MARKER_SETTINGS, LINE_MARKER_SETTINGS_OPTION, NO_FILE_EOL, TIMED, TIMED_ITERATIONS, WANT_AST, WANT_QUICK_FIXES, WANT_RANGES
-
-
Constructor Summary
Constructors Constructor Description LightPlatformCodeInsightFixtureSpecTestCase(@Nullable java.util.Map<java.lang.String,? extends com.vladsch.flexmark.util.data.DataHolder> optionMap, @Nullable com.vladsch.flexmark.util.data.DataHolder... defaultOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSuppressedException(@NotNull java.lang.Throwable e)Add a suppressed exceptionvoidafter()booleanannotatedWith(@NotNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)voidassertException(@NotNull com.intellij.testFramework.exceptionCases.AbstractExceptionCase<?> exceptionCase)voidassertException(@NotNull com.intellij.testFramework.exceptionCases.AbstractExceptionCase exceptionCase, @Nullable java.lang.String expectedErrorMsg)<T extends java.lang.Throwable>
voidassertNoException(@NotNull com.intellij.testFramework.exceptionCases.AbstractExceptionCase<T> exceptionCase)voidassertNoThrowable(@NotNull java.lang.Runnable closure)voidbefore()com.intellij.psi.PsiFilecreateLightFile(com.intellij.openapi.fileTypes.FileType fileType, java.lang.String text)Create a light file for the given textcom.intellij.psi.PsiFilecreateLightFile(java.lang.String fileName, com.intellij.lang.Language language, java.lang.String text)Create a light file for the given textvoiddefaultRunBare(@NotNull com.intellij.util.ThrowableRunnable<java.lang.Throwable> testRunnable)<T extends com.intellij.openapi.Disposable>
TdisposeOnTearDown(T disposable)@NotNull com.vladsch.flexmark.util.data.DataHoldergetDefaultOptions()Get default options for the tests@NotNull com.vladsch.flexmark.test.util.spec.SpecExamplegetExample()Get the current spec examplecom.intellij.testFramework.fixtures.CodeInsightTestFixturegetFixture()@NotNull java.lang.StringgetHomePath()@NotNull com.intellij.openapi.module.ModulegetModule()Get Module for the testcom.intellij.openapi.project.ProjectgetProject()com.intellij.psi.PsiManagergetPsiManager()Get PsiManager for the test@NotNull com.intellij.testFramework.fixtures.TempDirTestFixturegetTempDirFixture()@NotNull java.lang.StringgetTestDirectoryName()@NotNull java.lang.StringgetTestName(boolean lowercaseFirstLetter)@NotNull com.intellij.openapi.DisposablegetTestRootDisposable()@NotNull org.junit.rules.ExpectedExceptiongetThrown()booleanisIconRequired()booleanisPerformanceTest()booleanisStressTest()com.intellij.openapi.diagnostic.LoggerLOG()Get logger for the testcom.vladsch.flexmark.util.data.DataHolderoptions(@NotNull java.lang.String option)booleanrunInDispatchThread()booleanshouldContainTempFiles()booleanshouldRunTest()voidtest_case()-
Methods inherited from class com.intellij.testFramework.fixtures.BasePlatformTestCase
createTempDirTestFixture, getBasePath, getProjectDescriptor, getTestDataPath, isCommunity, isWriteActionRequired, runTestRunnable, setUp, tearDown
-
Methods inherited from class com.intellij.testFramework.UsefulTestCase
addTmpFileToKeep, asOuterRule, assertContainsElements, assertContainsElements, assertContainsOrdered, assertContainsOrdered, assertDoesntContain, assertDoesntContain, assertDoesntExist, assertEmpty, assertEmpty, assertEmpty, assertEmpty, assertExists, assertInstanceOf, assertNoException, assertNotEmpty, assertNullOrEmpty, assertOneElement, assertOneElement, assertOneOf, assertOrderedCollection, assertOrderedCollection, assertOrderedEquals, assertOrderedEquals, assertOrderedEquals, assertOrderedEquals, assertOrderedEquals, assertOrderedEquals, assertOrderedEquals, assertOrderedEquals, assertSameElements, assertSameElements, assertSameElements, assertSameElements, assertSameLines, assertSameLines, assertSameLinesWithFile, assertSameLinesWithFile, assertSameLinesWithFile, assertSameLinesWithFile, assertSize, assertSize, assertThrows, assertThrows, assertUnorderedCollection, assertUnorderedCollection, checkShouldRunTest, clearDeclaredFields, clearFields, disposeRootDisposable, doPostponedFormatting, edt, getTestName, invokeSetUp, invokeTearDown, printThreadDump, refreshAndFindFile, refreshRecursively, runBare, runBare, runTest, setupTempDir, toString, toString, toString, waitForAppLeakingThreads, wrapTestRunnable
-
Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, setName, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.vladsch.plugin.test.util.cases.CodeInsightFixtureSpecTestCase
addFullSpecExample, appendDefaultExampleOptions, beforeDoHighlighting, checkExample, closeOpenFile, collectAndCheckHighlighting, collectAndCheckHighlighting, create, createExampleSpecRenderer, createImageFile, defaultTestCase, executeAction, executeAction, finalizeRenderer, fullTestSpecComplete, fullTestSpecStarting, getAvailableIntentionsWithRanges, getCaretOffset, getEditor, getFile, getHostFile, getResultTextWithMarkup, getResultTextWithMarkup, getSpecExampleRenderer, initializeRenderer, renderSpecTestAst, resolveIconName
-
-
-
-
Constructor Detail
-
LightPlatformCodeInsightFixtureSpecTestCase
public LightPlatformCodeInsightFixtureSpecTestCase(@Nullable @Nullable java.util.Map<java.lang.String,? extends com.vladsch.flexmark.util.data.DataHolder> optionMap, @Nullable @Nullable com.vladsch.flexmark.util.data.DataHolder... defaultOptions)
-
-
Method Detail
-
before
public void before() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
after
public void after() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
options
public final com.vladsch.flexmark.util.data.DataHolder options(@NotNull @NotNull java.lang.String option)- Specified by:
optionsin interfacecom.vladsch.flexmark.test.util.SpecExampleProcessor
-
test_case
public final void test_case()
-
getDefaultOptions
@NotNull public final @NotNull com.vladsch.flexmark.util.data.DataHolder getDefaultOptions()
Description copied from interface:CodeInsightFixtureSpecTestCaseGet default options for the tests- Specified by:
getDefaultOptionsin interfaceCodeInsightFixtureSpecTestCase- Returns:
- default options
-
getFixture
public final com.intellij.testFramework.fixtures.CodeInsightTestFixture getFixture()
- Specified by:
getFixturein interfaceCodeInsightFixtureSpecTestCase
-
LOG
public final com.intellij.openapi.diagnostic.Logger LOG()
Description copied from interface:CodeInsightFixtureSpecTestCaseGet logger for the test- Specified by:
LOGin interfaceCodeInsightFixtureSpecTestCase- Returns:
- Logger
-
getExample
@NotNull public final @NotNull com.vladsch.flexmark.test.util.spec.SpecExample getExample()
Description copied from interface:CodeInsightFixtureSpecTestCaseGet the current spec example- Specified by:
getExamplein interfaceCodeInsightFixtureSpecTestCase- Returns:
- spec example
-
getThrown
@NotNull public final @NotNull org.junit.rules.ExpectedException getThrown()
- Specified by:
getThrownin interfaceCodeInsightFixtureSpecTestCase
-
getTempDirFixture
@NotNull public final @NotNull com.intellij.testFramework.fixtures.TempDirTestFixture getTempDirFixture()
- Specified by:
getTempDirFixturein interfaceCodeInsightFixtureSpecTestCase
-
getProject
public final com.intellij.openapi.project.Project getProject()
- Specified by:
getProjectin interfaceCodeInsightFixtureSpecTestCase- Overrides:
getProjectin classcom.intellij.testFramework.fixtures.BasePlatformTestCase
-
getPsiManager
public final com.intellij.psi.PsiManager getPsiManager()
Description copied from interface:CodeInsightFixtureSpecTestCaseGet PsiManager for the test- Specified by:
getPsiManagerin interfaceCodeInsightFixtureSpecTestCase- Overrides:
getPsiManagerin classcom.intellij.testFramework.fixtures.BasePlatformTestCase- Returns:
- PsiManager
-
createLightFile
public final com.intellij.psi.PsiFile createLightFile(com.intellij.openapi.fileTypes.FileType fileType, java.lang.String text)Description copied from interface:CodeInsightFixtureSpecTestCaseCreate a light file for the given text- Specified by:
createLightFilein interfaceCodeInsightFixtureSpecTestCase- Overrides:
createLightFilein classcom.intellij.testFramework.fixtures.BasePlatformTestCase- Parameters:
fileType- file typetext- file text- Returns:
- PsiFile
-
createLightFile
public final com.intellij.psi.PsiFile createLightFile(java.lang.String fileName, com.intellij.lang.Language language, java.lang.String text)Description copied from interface:CodeInsightFixtureSpecTestCaseCreate a light file for the given text- Specified by:
createLightFilein interfaceCodeInsightFixtureSpecTestCase- Overrides:
createLightFilein classcom.intellij.testFramework.fixtures.BasePlatformTestCase- Parameters:
fileName- file namelanguage- languagetext- file text- Returns:
- PsiFile
-
getModule
@NotNull public final @NotNull com.intellij.openapi.module.Module getModule()
Description copied from interface:CodeInsightFixtureSpecTestCaseGet Module for the test- Specified by:
getModulein interfaceCodeInsightFixtureSpecTestCase- Overrides:
getModulein classcom.intellij.testFramework.fixtures.BasePlatformTestCase- Returns:
- Module
-
addSuppressedException
public final void addSuppressedException(@NotNull @NotNull java.lang.Throwable e)Description copied from interface:CodeInsightFixtureSpecTestCaseAdd a suppressed exception- Specified by:
addSuppressedExceptionin interfaceCodeInsightFixtureSpecTestCase- Overrides:
addSuppressedExceptionin classcom.intellij.testFramework.UsefulTestCase- Parameters:
e- exception to add
-
shouldContainTempFiles
public final boolean shouldContainTempFiles()
- Specified by:
shouldContainTempFilesin interfaceCodeInsightFixtureSpecTestCase- Overrides:
shouldContainTempFilesin classcom.intellij.testFramework.UsefulTestCase
-
isIconRequired
public final boolean isIconRequired()
- Specified by:
isIconRequiredin interfaceCodeInsightFixtureSpecTestCase- Overrides:
isIconRequiredin classcom.intellij.testFramework.UsefulTestCase
-
getTestRootDisposable
@NotNull public final @NotNull com.intellij.openapi.Disposable getTestRootDisposable()
- Specified by:
getTestRootDisposablein interfaceCodeInsightFixtureSpecTestCase- Overrides:
getTestRootDisposablein classcom.intellij.testFramework.fixtures.BasePlatformTestCase
-
shouldRunTest
public final boolean shouldRunTest()
- Specified by:
shouldRunTestin interfaceCodeInsightFixtureSpecTestCase- Overrides:
shouldRunTestin classcom.intellij.testFramework.UsefulTestCase
-
defaultRunBare
public final void defaultRunBare(@NotNull @NotNull com.intellij.util.ThrowableRunnable<java.lang.Throwable> testRunnable) throws java.lang.Throwable- Specified by:
defaultRunBarein interfaceCodeInsightFixtureSpecTestCase- Overrides:
defaultRunBarein classcom.intellij.testFramework.UsefulTestCase- Throws:
java.lang.Throwable
-
runInDispatchThread
public final boolean runInDispatchThread()
- Specified by:
runInDispatchThreadin interfaceCodeInsightFixtureSpecTestCase- Overrides:
runInDispatchThreadin classcom.intellij.testFramework.UsefulTestCase
-
disposeOnTearDown
@NotNull public final <T extends com.intellij.openapi.Disposable> T disposeOnTearDown(@NotNull T disposable)- Specified by:
disposeOnTearDownin interfaceCodeInsightFixtureSpecTestCase- Overrides:
disposeOnTearDownin classcom.intellij.testFramework.UsefulTestCase
-
getTestName
@NotNull public final @NotNull java.lang.String getTestName(boolean lowercaseFirstLetter)
- Specified by:
getTestNamein interfaceCodeInsightFixtureSpecTestCase- Overrides:
getTestNamein classcom.intellij.testFramework.UsefulTestCase
-
getTestDirectoryName
@NotNull public final @NotNull java.lang.String getTestDirectoryName()
- Specified by:
getTestDirectoryNamein interfaceCodeInsightFixtureSpecTestCase- Overrides:
getTestDirectoryNamein classcom.intellij.testFramework.UsefulTestCase
-
isPerformanceTest
public final boolean isPerformanceTest()
- Specified by:
isPerformanceTestin interfaceCodeInsightFixtureSpecTestCase- Overrides:
isPerformanceTestin classcom.intellij.testFramework.UsefulTestCase
-
isStressTest
public final boolean isStressTest()
- Specified by:
isStressTestin interfaceCodeInsightFixtureSpecTestCase- Overrides:
isStressTestin classcom.intellij.testFramework.UsefulTestCase
-
assertException
public final void assertException(@NotNull @NotNull com.intellij.testFramework.exceptionCases.AbstractExceptionCase<?> exceptionCase)- Overrides:
assertExceptionin classcom.intellij.testFramework.UsefulTestCase
-
assertException
public final void assertException(@NotNull @NotNull com.intellij.testFramework.exceptionCases.AbstractExceptionCase exceptionCase, @Nullable @Nullable java.lang.String expectedErrorMsg)- Overrides:
assertExceptionin classcom.intellij.testFramework.UsefulTestCase
-
assertNoException
public final <T extends java.lang.Throwable> void assertNoException(@NotNull @NotNull com.intellij.testFramework.exceptionCases.AbstractExceptionCase<T> exceptionCase) throws T extends java.lang.Throwable- Overrides:
assertNoExceptionin classcom.intellij.testFramework.UsefulTestCase- Throws:
T extends java.lang.Throwable
-
assertNoThrowable
public final void assertNoThrowable(@NotNull @NotNull java.lang.Runnable closure)- Specified by:
assertNoThrowablein interfaceCodeInsightFixtureSpecTestCase- Overrides:
assertNoThrowablein classcom.intellij.testFramework.UsefulTestCase
-
annotatedWith
public final boolean annotatedWith(@NotNull @NotNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)- Specified by:
annotatedWithin interfaceCodeInsightFixtureSpecTestCase- Overrides:
annotatedWithin classcom.intellij.testFramework.UsefulTestCase
-
getHomePath
@NotNull public final @NotNull java.lang.String getHomePath()
- Specified by:
getHomePathin interfaceCodeInsightFixtureSpecTestCase- Overrides:
getHomePathin classcom.intellij.testFramework.UsefulTestCase
-
-