Add more test cases for @Component hovers.

Handle the case where bean id is set explicitly in the annotation.
This commit is contained in:
Kris De Volder
2017-10-27 16:58:36 -07:00
parent 68de1dd0c5
commit f95660cfcb
6 changed files with 419 additions and 48 deletions

View File

@@ -603,6 +603,12 @@ public class Editor {
assertContains(snippet, hoverString(hover));
}
public void assertTrimmedHover(String hoverOver, String expectedHover) throws Exception {
int hoverPosition = getHoverPosition(hoverOver,1);
Hover hover = harness.getHover(doc, doc.toPosition(hoverPosition));
assertEquals(expectedHover.trim(), hoverString(hover).trim());
}
public void assertNoHover(String hoverOver) throws Exception {
int hoverPosition = getRawText().indexOf(hoverOver) + hoverOver.length() / 2;
Hover hover = harness.getHover(doc, doc.toPosition(hoverPosition));