本文整理汇总了Java中fitnesse.testsystems.slim.SlimTestContext类的典型用法代码示例。如果您正苦于以下问题:Java SlimTestContext类的具体用法?Java SlimTestContext怎么用?Java SlimTestContext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SlimTestContext类属于fitnesse.testsystems.slim包,在下文中一共展示了SlimTestContext类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: assertion
import fitnesse.testsystems.slim.SlimTestContext; //导入依赖的package包/类
private Assertion assertion() throws SyntaxError {
NodeList headerColumns = new NodeList();
headerColumns.add( new TableColumn() );
TableHeader tableHeader = new TableHeader();
tableHeader.setChildren( headerColumns );
NodeList rowColumns = new NodeList();
rowColumns.add( new TableColumn() );
TableRow tableRow = new TableRow();
tableRow.setChildren( rowColumns );
NodeList rows = new NodeList();
rows.add( tableHeader );
rows.add( tableRow );
TableTag tableTag = new TableTag();
tableTag.setChildren( rows );
TestPage testPage = new WikiTestPage( new WikiPageDummy());
SlimTestContext testContext = new SlimTestContextImpl( testPage );
Table table = new HtmlTable( tableTag );
List<SlimAssertion> list = new QueryTable( table, "id", testContext ).getAssertions();
return list.get( 0 );
}
示例2: call
import fitnesse.testsystems.slim.SlimTestContext; //导入依赖的package包/类
@Override
public List<SlimAssertion> call(Map<String, String> scenarioArguments,
SlimTable parentTable, int row) throws TestExecutionException {
try {
currentCallArguments = scenarioArguments;
if (scenarioArguments.isEmpty()) {
SlimTestContext context = parentTable.getTestContext();
if (context instanceof ScenarioTestContext) {
ScenarioTestContext sTestContext = (ScenarioTestContext) context;
AutoArgScenarioTable caller = getCallingTable(sTestContext);
Map<String, String> callerArgs = caller.getCurrentCallArguments();
for (Map.Entry<String, String> entry : callerArgs.entrySet()) {
String arg = entry.getKey();
if (inputs.contains(arg)) {
scenarioArguments.put(arg, entry.getValue());
}
}
}
}
return super.call(scenarioArguments, parentTable, row);
} finally {
currentCallArguments = null;
}
}
示例3: StoryboardTable
import fitnesse.testsystems.slim.SlimTestContext; //导入依赖的package包/类
public StoryboardTable(Table table, String tableId, SlimTestContext context) {
super(table, tableId, context);
String fullPath = context.getPageToTest().getFullPath();
screenshotPrefix = fullPath;
if (!fullPath.equals(lastPage)) {
lastTop = null;
storyboardCount = 0;
screenshotCount = 0;
lastPage = fullPath;
}
}
示例4: addNestedScenarioArguments
import fitnesse.testsystems.slim.SlimTestContext; //导入依赖的package包/类
private void addNestedScenarioArguments(Set<String> found, boolean addInputs, String cellContent) {
String scenarioName = getCalledScenarioName(cellContent);
SlimTestContext testContext = getTestContext();
ScenarioTable scenario;
if (testContext instanceof SlimCoverageTestContextImpl) {
scenario = ((SlimCoverageTestContextImpl) testContext).getScenarioNoCount(scenarioName);
} else {
scenario = testContext.getScenario(scenarioName);
}
if (scenario != null) {
Set<String> scenarioArgs = addInputs ? scenario.getInputs() : scenario.getOutputs();
found.addAll(scenarioArgs);
}
}
示例5: SeleniumScriptTable
import fitnesse.testsystems.slim.SlimTestContext; //导入依赖的package包/类
public SeleniumScriptTable(Table table, String id, SlimTestContext testContext) {
super(table, id, testContext);
}
示例6: AutoArgScenarioTable
import fitnesse.testsystems.slim.SlimTestContext; //导入依赖的package包/类
public AutoArgScenarioTable(Table table, String tableId, SlimTestContext testContext) {
super(table, tableId, testContext);
}