All Downloads are FREE. Search and download functionalities are using the official Maven repository.

example.MockRestClient Maven / Gradle / Ivy

Go to download

Rest Cucumber allows you to attach a rest client for retrieval of Cucumber feature files and posting of Cucumber test results

There is a newer version: 1.3
Show newest version
package example;

import java.util.HashSet;
import java.util.Set;
import rest.CucumberRestClient;
import rest.ResultOutput;

public class MockRestClient implements CucumberRestClient {
   public static CucumberRestClient buildClient(String pathToProperties) {
      return new MockRestClient();
   }

   public MockRestClient() {
   }

   public String generateFeatureString(String issueKey) {
      issueKey = "test";
      return "Feature: Mock feature 1\n" + "Scenario: Creating a mock\n"
         + "Given I have 43 cukes in my belly\n" + "When I wait 1 hour\n"
         + "Then my belly should growl\n" + "Scenario: Creating a mock2\n"
         + "Given No oncoming traffic\n" + "When I cross the road\n"
         + "Then On the other side";
   }

   public boolean updateExecution(ResultOutput resultOutput) {
      return false;
   }

   public Set getIssues() {
      Set issues = new HashSet();
      issues.add("1234");
      return issues;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy