[site] Folding test

This commit is contained in:
Anna Bulenkova 2015-03-24 11:54:57 +01:00
parent db01f73dcd
commit 8418f5f24a
3 changed files with 46 additions and 2 deletions

View File

@ -70,7 +70,7 @@
* [Annotator Test](annotator_test.html)
* [Formatter Test](formatter_test.html)
* [Rename Test](rename_test.html)
* [Folding Test](TODO)
* [Folding Test](folding_test.html)
* [Find Usages Test](TODO)
* [Commenter Test](TODO)
* [Reference Test](TODO)

44
folding_test.md Normal file
View File

@ -0,0 +1,44 @@
---
title: Folding Test
---
<!--
INITIAL_SOURCE https://confluence.jetbrains.com/display/IntelliJIDEA/Folding+Test
-->
# {{ page.title }}
In this test we will check if the folding builder, implemented in the
[Folding Builder](folding_builder.html)
section of the
[Custom Language Support Tutorial](cls_tutorial.html),
works as we expect.
### 1. Define test data
Create a file *FoldingTestData.java*.
```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
```java
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](rename_test.html) [Top](writing_tests_for_plugins.html) [Next](find_usages_test.html)

View File

@ -20,7 +20,7 @@ and cover its code with functional tests.
* [Annotator Test](annotator_test.html)
* [Formatter Test](formatter_test.html)
* [Rename Test](rename_test.html)
* [Folding Test](TODO)
* [Folding Test](folding_test.html)
* [Find Usages Test](TODO)
* [Commenter Test](TODO)
* [Reference Test](TODO)