Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 1.44 KB

File metadata and controls

28 lines (23 loc) · 1.44 KB
title
7. Folding Test

This test verifies the Simple Language folding builder, implemented in the Folding Builder section of the Custom Language Support Tutorial, works as expected.

NOTE A folding builder must implement DumbAware to pass tests. See Define a Folding Builder for more information.

7.1. Define Test Data

Create a file FoldingTestData.java in the testData directory. This java file contains markup instructions for three different cases of code folding.

{% include /code_samples/simple_language_plugin/src/test/testData/FoldingTestData.java %}

7.2. Define a Test

Add the testFolding() method to the SimpleCodeInsightTest class previously defined. This test method reuses the DefaultTestData.simple properties file.

  public void testFolding() {
    myFixture.configureByFile("DefaultTestData.simple");
    myFixture.testFolding(getTestDataPath() + "/FoldingTestData.java");
  }

7.3. Run the Test

Run the test and make sure it's green.