use of org.elixir_lang.structure_view.element.CallDefinitionClause in project intellij-elixir by KronicDeth.
the class GotoSymbolContributorTest method testIssue472.
/*
* Tests
*/
public void testIssue472() {
myFixture.configureByFile("issue_472.ex");
ChooseByNameContributor[] symbolModelContributors = ChooseByNameRegistry.getInstance().getSymbolModelContributors();
GotoSymbolContributor gotoSymbolContributor = null;
for (ChooseByNameContributor symbolModelContributor : symbolModelContributors) {
if (symbolModelContributor instanceof GotoSymbolContributor) {
gotoSymbolContributor = (GotoSymbolContributor) symbolModelContributor;
}
}
assertNotNull(gotoSymbolContributor);
NavigationItem[] itemsByName = gotoSymbolContributor.getItemsByName("decode_auth_type", "decode_a", myFixture.getProject(), false);
assertEquals(2, itemsByName.length);
assertInstanceOf(itemsByName[0], CallDefinition.class);
CallDefinition callDefinition = (CallDefinition) itemsByName[0];
assertEquals("decode_auth_type", callDefinition.name());
assertInstanceOf(itemsByName[1], CallDefinitionClause.class);
CallDefinitionClause callDefinitionClause = (CallDefinitionClause) itemsByName[1];
assertEquals("decode_auth_type", callDefinitionClause.getName());
}
Aggregations