public void testModuleBif() { doTest("bar() -> math:sin(<caret>)", 0); }
private void doTest(String text, int highlightedParameterIndex) {
myFixture.configureByText("a.erl", text);
ErlangParameterInfoHandler parameterInfoHandler = new ErlangParameterInfoHandler();
CreateParameterInfoContext createContext = new MockCreateParameterInfoContext(myFixture.getEditor(), myFixture.getFile());
ErlangArgumentList list = parameterInfoHandler.findElementForParameterInfo(createContext);
if (highlightedParameterIndex >= 0) {
assertNotNull(list);
parameterInfoHandler.showParameterInfo(list, createContext);
Object[] itemsToShow = createContext.getItemsToShow();
assertNotNull(itemsToShow);
assertTrue(itemsToShow.length > 0);
}
MockUpdateParameterInfoContext updateContext = new MockUpdateParameterInfoContext(myFixture.getEditor(), myFixture.getFile());
ErlangArgumentList element = parameterInfoHandler.findElementForUpdatingParameterInfo(updateContext);