Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
div
classnavigation
HTML Table
width100%
Table Row (tr)
Table Cell (td)
Align
alignleft
Previous
span
classsep
|
span
classtext
Completion Test
Table Cell (td)
Align
aligncenter
Top
span
classsep
|
span
classtext
Plugin Tests
Table Cell (td)
Align
alignright
Next
span
classsep
|
span
classtext
Formatter Test

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.

div
classnavigation
HTML Table
width100%
Table Row (tr)
Table Cell (td)
Align
alignleft
Previous
span
classsep
|
span
classtext
Completion Test
Table Cell (td)
Align
aligncenter
Top
span
classsep
|
span
classtext
Plugin Tests
Table Cell (td)
Align
alignright
Next
span
classsep
|
span
classtext
Formatter Test