Search in sources :

Example 11 with ModuleHelper

use of com.thoughtworks.gauge.helper.ModuleHelper in project Intellij-Plugin by getgauge.

the class ConceptStepImplTest method testShouldGetReferenceInGaugeModule.

@Test
public void testShouldGetReferenceInGaugeModule() throws Exception {
    ModuleHelper helper = mock(ModuleHelper.class);
    ASTNode node = mock(ASTNode.class);
    ConceptStepImpl conceptStep = new ConceptStepImpl(node, helper);
    when(helper.isGaugeModule(conceptStep)).thenReturn(true);
    PsiReference reference = conceptStep.getReference();
    assertEquals(reference.getClass(), ConceptReference.class);
}
Also used : ModuleHelper(com.thoughtworks.gauge.helper.ModuleHelper) ASTNode(com.intellij.lang.ASTNode) PsiReference(com.intellij.psi.PsiReference) Test(org.junit.Test)

Aggregations

ModuleHelper (com.thoughtworks.gauge.helper.ModuleHelper)11 Test (org.junit.Test)11 ASTNode (com.intellij.lang.ASTNode)4 PsiReference (com.intellij.psi.PsiReference)4 BeforeStep (com.thoughtworks.gauge.BeforeStep)2 SpecStep (com.thoughtworks.gauge.language.psi.SpecStep)1