Package cucumber.eclipse.steps.integration

Examples of cucumber.eclipse.steps.integration.Step


  private PopupMenuFindStepActionDelegate delagate = new PopupMenuFindStepActionDelegate();
 
  @Test
  public void simpleStepMatches() {
   
    Step s = createStep("^I run a test$");
   
    assertEquals(s, delagate.matchSteps("en", Collections.singleton(s), "When I run a test"));
  }
View Full Code Here


  }

  @Test
  public void scenarioOutlines() {
   
    Step s = createStep("^there are (\\d)* cucumbers$");
   
    assertEquals(s, delagate.matchSteps("en", Collections.singleton(s), "Given there are <start> cucumbers"));
  }
View Full Code Here

  }
 
  @Test
  public void scenarioOutlinesString() {
   
    Step s = createStep("^there are (\\w)* cucumbers$");
    Step s2 = createStep("^I should see the (.*) message$");
    Set<Step> steps = new HashSet<Step>();
    steps.add(s2);
    steps.add(s);
   
    assertEquals(s, delagate.matchSteps("en", steps, "Given there are <start> cucumbers"));
View Full Code Here

    assertEquals(s, delagate.matchSteps("en", steps, "Given there are <start> cucumbers"));
  }
 
  private Step createStep(String text) {
   
    Step s = new Step();
    s.setText(text);
    return s;
  }
View Full Code Here

    }
   
    String selectedLine = getSelectedLine(editorPart);
    String language = getDocumentLanguage(editorPart);

    Step matchedStep = matchSteps(language, steps, selectedLine);
    try {
      if (matchedStep != null) openEditor(matchedStep);
    } catch (CoreException e) {
      e.printStackTrace();
    }
View Full Code Here

    for (IType t : compUnit.getTypes()) {
      for (IMethod method : t.getMethods()) {
        for (IAnnotation annotation : method.getAnnotations()) {
          CucumberAnnotation cukeAnnotation = getCukeAnnotation(importedAnnotations, annotation);
          if (cukeAnnotation != null) {
            Step step = new Step();
            step.setSource(method.getResource());
            step.setText(getAnnotationText(annotation));
            step.setLineNumber(getLineNumber(compUnit, annotation));
            step.setLang(cukeAnnotation.getLang());
            steps.add(step);

          }
        }
      }
View Full Code Here

TOP

Related Classes of cucumber.eclipse.steps.integration.Step

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.