intellij-sdk-code-samples/folding_test.md
2015-03-24 11:54:57 +01:00

969 B

title
Folding Test

{{ page.title }}

In this test we will check if the folding builder, implemented in the Folding Builder section of the Custom Language Support Tutorial, works as we expect.

1. Define test data

Create a file FoldingTestData.java.

public class Test {
    public static void main(String[] args) <fold text='{...}'>{
        System.out.println("<fold text='http://en.wikipedia.org/'>simple:website</fold>");
    }</fold>
}

2. Define a test

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

3. Run the test

Run the test and make sure it's green.


Previous Top Next