Wiki Markup |
---|
{div:class=navigation}
{table:width=100%}
{tr}
{td} {align:left}[Previous|Completion Test] {span:class=sep}\|{span} {span:class=text}Completion Test{span}{align} {td}
{td} {align:center}[Top|Writing Tests for Plugins] {span:class=sep}\|{span} {span:class=text}Writing Tests for Plugins{span}{align} {td}
{td} {align:right}[Next|Formatter Test] {span:class=sep}\|{span} {span:class=text}Formatter Test{span}{align} {td}
{tr}
{table}
{div} |
In this test we will check if the annotator, implemented in the previous tutorial, works as we expect.
1. Define test data
Create a file "AnnotatorTestData.java".
Code Block |
---|
public class Test {
public static void main(String[] args) {
System.out.println("simple:website");
System.out.println("simple:<error descr="Unresolved property">websit"</error>);
}
}
|
2. Define a test method
Code Block |
---|
public void testAnnotator() {
myFixture.configureByFiles("AnnotatorTestData.java", "DefaultTestData.simple");
myFixture.checkHighlighting(false, false, true);
}
|
3. Run the test
Run the test and make sure it's green.
Wiki Markup |
---|
{div:class=navigation}
{table:width=100%}
{tr}
{td} {align:left}[Previous|Completion Test] {span:class=sep}\|{span} {span:class=text}Completion Test{span}{align} {td}
{td} {align:center}[Top|Writing Tests for Plugins] {span:class=sep}\|{span} {span:class=text}Writing Tests for Plugins{span}{align} {td}
{td} {align:right}[Next|Formatter Test] {span:class=sep}\|{span} {span:class=text}Formatter Test{span}{align} {td}
{tr}
{table}
{div} |
Redirect |
---|
location | http://www.jetbrains.org/intellij/sdk/docs/tutorials/writing_tests_for_plugins/annotator_test.html |
---|
|