Class JavaCodeInsightFixtureSpecTestCase

  • All Implemented Interfaces:
    com.intellij.testFramework.TestIndexingModeSupporter, com.vladsch.flexmark.test.util.SpecExampleProcessor, CodeInsightFixtureSpecTestCase, SpecTest, junit.framework.Test

    public abstract class JavaCodeInsightFixtureSpecTestCase
    extends com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase
    implements CodeInsightFixtureSpecTestCase
    • Field Detail

      • myThrown

        public final org.junit.rules.ExpectedException myThrown
      • myExample

        @NotNull
        public @NotNull com.vladsch.flexmark.test.util.spec.SpecExample myExample
    • Constructor Detail

      • JavaCodeInsightFixtureSpecTestCase

        public JavaCodeInsightFixtureSpecTestCase​(@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
      • tuneFixture

        protected void tuneFixture​(com.intellij.testFramework.builders.JavaModuleFixtureBuilder moduleBuilder)
                            throws java.lang.Exception
        Overrides:
        tuneFixture in class com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase
        Throws:
        java.lang.Exception
      • getName

        public java.lang.String getName()
        Overrides:
        getName in class junit.framework.TestCase
      • options

        public final com.vladsch.flexmark.util.data.DataHolder options​(@NotNull
                                                                       @NotNull java.lang.String option)
        Specified by:
        options in interface com.vladsch.flexmark.test.util.SpecExampleProcessor
      • test_case

        public final void test_case()
      • getEditor

        public final com.intellij.openapi.editor.ex.EditorEx getEditor()
        Description copied from interface: CodeInsightFixtureSpecTestCase
        Returns the editor currently opened in the in-memory editor. to make it same as LightPlatformCodeInsightTestCase
        Specified by:
        getEditor in interface CodeInsightFixtureSpecTestCase
        Returns:
        editor currently opened in the in-memory editor.
      • getElementFactory

        public final com.intellij.psi.PsiElementFactory getElementFactory()
        Overrides:
        getElementFactory in class com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase
      • getProject

        public final com.intellij.openapi.project.Project getProject()
        Specified by:
        getProject in interface CodeInsightFixtureSpecTestCase
        Overrides:
        getProject in class com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase
      • getPsiManager

        public final com.intellij.psi.impl.PsiManagerEx getPsiManager()
        Description copied from interface: CodeInsightFixtureSpecTestCase
        Get PsiManager for the test
        Specified by:
        getPsiManager in interface CodeInsightFixtureSpecTestCase
        Overrides:
        getPsiManager in class com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase
        Returns:
        PsiManager
      • createLightFile

        public final com.intellij.psi.PsiFile createLightFile​(com.intellij.openapi.fileTypes.FileType fileType,
                                                              java.lang.String text)
        Description copied from interface: CodeInsightFixtureSpecTestCase
        Create a light file for the given text
        Specified by:
        createLightFile in interface CodeInsightFixtureSpecTestCase
        Parameters:
        fileType - file type
        text - 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: CodeInsightFixtureSpecTestCase
        Create a light file for the given text
        Specified by:
        createLightFile in interface CodeInsightFixtureSpecTestCase
        Parameters:
        fileName - file name
        language - language
        text - file text
        Returns:
        PsiFile
      • getModule

        @NotNull
        public final @NotNull com.intellij.openapi.module.Module getModule()
        Description copied from interface: CodeInsightFixtureSpecTestCase
        Get Module for the test
        Specified by:
        getModule in interface CodeInsightFixtureSpecTestCase
        Overrides:
        getModule in class com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase
        Returns:
        Module
      • getTestRootDisposable

        @NotNull
        public final @NotNull com.intellij.openapi.Disposable getTestRootDisposable()
        Specified by:
        getTestRootDisposable in interface CodeInsightFixtureSpecTestCase
        Overrides:
        getTestRootDisposable in class com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase
      • defaultRunBare

        public final void defaultRunBare​(@NotNull
                                         @NotNull com.intellij.util.ThrowableRunnable<java.lang.Throwable> testRunnable)
                                  throws java.lang.Throwable
        Specified by:
        defaultRunBare in interface CodeInsightFixtureSpecTestCase
        Overrides:
        defaultRunBare in class com.intellij.testFramework.UsefulTestCase
        Throws:
        java.lang.Throwable
      • disposeOnTearDown

        @NotNull
        public final <T extends com.intellij.openapi.Disposable> T disposeOnTearDown​(@NotNull
                                                                                     T disposable)
        Specified by:
        disposeOnTearDown in interface CodeInsightFixtureSpecTestCase
        Overrides:
        disposeOnTearDown in class com.intellij.testFramework.UsefulTestCase
      • getTestName

        @NotNull
        public final @NotNull java.lang.String getTestName​(boolean lowercaseFirstLetter)
        Specified by:
        getTestName in interface CodeInsightFixtureSpecTestCase
        Overrides:
        getTestName in class com.intellij.testFramework.UsefulTestCase
      • getTestDirectoryName

        @NotNull
        public final @NotNull java.lang.String getTestDirectoryName()
        Specified by:
        getTestDirectoryName in interface CodeInsightFixtureSpecTestCase
        Overrides:
        getTestDirectoryName in class com.intellij.testFramework.UsefulTestCase
      • assertException

        public final void assertException​(@NotNull
                                          @NotNull com.intellij.testFramework.exceptionCases.AbstractExceptionCase<?> exceptionCase)
        Overrides:
        assertException in class com.intellij.testFramework.UsefulTestCase
      • assertException

        public final void assertException​(@NotNull
                                          @NotNull com.intellij.testFramework.exceptionCases.AbstractExceptionCase exceptionCase,
                                          @Nullable
                                          @Nullable java.lang.String expectedErrorMsg)
        Overrides:
        assertException in class com.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:
        assertNoException in class com.intellij.testFramework.UsefulTestCase
        Throws:
        T extends java.lang.Throwable
      • assertNoThrowable

        public final void assertNoThrowable​(@NotNull
                                            @NotNull java.lang.Runnable closure)
        Specified by:
        assertNoThrowable in interface CodeInsightFixtureSpecTestCase
        Overrides:
        assertNoThrowable in class com.intellij.testFramework.UsefulTestCase
      • annotatedWith

        public final boolean annotatedWith​(@NotNull
                                           @NotNull java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
        Specified by:
        annotatedWith in interface CodeInsightFixtureSpecTestCase
        Overrides:
        annotatedWith in class com.intellij.testFramework.UsefulTestCase
      • getHomePath

        @NotNull
        public final @NotNull java.lang.String getHomePath()
        Specified by:
        getHomePath in interface CodeInsightFixtureSpecTestCase
        Overrides:
        getHomePath in class com.intellij.testFramework.UsefulTestCase