2015-07-09 15:54:37 +01:00

869 B

title
7. Folding Test

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.

7.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>
}

7.2. Define a test

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

7.3. Run the test

Run the test and make sure it's green.


Previous Top Next