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.
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 %}
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");
}
Run the test and make sure it's green.