@@ -0,0 +1,2340 @@
+/*%0A * Copyright (C) 2016 Reece H. Dunn%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage uk.co.reecedunn.intellij.plugin.xquery.tests.findUsages;%0A%0Aimport com.intellij.lang.HelpID;%0Aimport uk.co.reecedunn.intellij.plugin.xquery.ast.xquery.XQueryFile;%0Aimport uk.co.reecedunn.intellij.plugin.xquery.ast.xquery.XQueryNCName;%0Aimport uk.co.reecedunn.intellij.plugin.xquery.ast.xquery.XQueryVarName;%0Aimport uk.co.reecedunn.intellij.plugin.xquery.ast.xquery.XQueryVarRef;%0Aimport uk.co.reecedunn.intellij.plugin.xquery.findUsages.XQueryFindUsagesProvider;%0Aimport uk.co.reecedunn.intellij.plugin.xquery.tests.parser.ParserTestCase;%0A%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static uk.co.reecedunn.intellij.plugin.xquery.functional.PsiTreeWalker.children;%0Aimport static uk.co.reecedunn.intellij.plugin.xquery.functional.PsiTreeWalker.descendants;%0A%0Apublic class XQueryFindUsagesProviderTest extends ParserTestCase %7B%0A    public void testNCName() %7B%0A        final XQueryFindUsagesProvider provider = new XQueryFindUsagesProvider();%0A%0A        XQueryFile file = parseResource(%22tests/parser/xquery-1.0/VarRef.xq%22);%0A        XQueryVarRef varRef = descendants(file).findFirst(XQueryVarRef.class).get();%0A        XQueryVarName varName = children(varRef).findFirst(XQueryVarName.class).get();%0A        XQueryNCName ncName = children(varName).findFirst(XQueryNCName.class).get();%0A%0A        assertThat(provider.canFindUsagesFor(ncName), is(true));%0A        assertThat(provider.getHelpId(ncName), is(HelpID.FIND_OTHER_USAGES));%0A        assertThat(provider.getType(ncName), is(%22%22));%0A        assertThat(provider.getDescriptiveName(ncName), is(%22one%22));%0A        assertThat(provider.getNodeText(ncName, true), is(%22one%22));%0A        assertThat(provider.getNodeText(ncName, false), is(%22one%22));%0A    %7D%0A%7D%0A

Add a test case for XQueryFindUsagesProvider.