Details
-
Type: Task
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Core Examples
-
Labels:None
-
Environment:Windows Eclipse
-
Number of attachments :
Description
I am trying to run Trader Example to implement ExampleTable for Parameterized Tabular Data. I am getting an error of "No runnable methods".
my story:
Scenario: To print tabular data
Given the traders:
name | rank |
Larry | Stooge 3 |
Moe | Stooge 1 |
Curly | Stooge 2 |
When a wildcard search ".*y" is executed"
Then the traders returned are:
name | rank |
Larry | Stooge 3 |
Curly | Stooge 2 |
package com.BaseStory;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.jbehave.core.annotations.Given;
import org.jbehave.core.annotations.Then;
import org.jbehave.core.annotations.When;
import org.jbehave.core.model.ExamplesTable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import static org.junit.Assert.*;
import model.Stock;
import model.Trader;
import model.Stock.AlertStatus;
import service.TradingService;
public class TraderSteps {
private TradingService service;
private Stock stock;
private Trader trader;
private List<Trader> traders = new ArrayList<Trader>();
private List<Trader> searchedTraders;
@Given("the traders: %tradersTable")
public void theTraders(ExamplesTable tradersTable)
@When("a wildcard search \"%regex\" is executed")
public void aWildcardSearchIsExecuted(String regex) {
searchedTraders = new ArrayList<Trader>();
for (Trader trader : traders) {
if ( trader.getName().matches(regex) )
}
}
@Then("the traders returned are: %tradersTable")
public void theTradersReturnedAre(ExamplesTable tradersTable)
private List<Trader> toTraders(ExamplesTable table) {
List<Trader> traders = new ArrayList<Trader>();
List<Map<String, String>> rows = table.getRows();
for (Map<String, String> row : rows)
Collections.sort(traders);
return traders;
}
}
Please do NOT log a JIRA item for a discussion - please use the mailing lists. If a bug is found as part of that discussion, then we will log a bug (or feature request).