mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-29 01:37:51 +08:00
992 B
992 B
title |
---|
Annotator Test |
{{ page.title }}
In this test we will check if the annotator, implemented in the Annotator section of the Custom Language Support Tutorial works as we expect.
1. Define test data
Create a file AnnotatorTestData.java.
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
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.