本文整理汇总了Java中cucumber.runtime.HookDefinition类的典型用法代码示例。如果您正苦于以下问题:Java HookDefinition类的具体用法?Java HookDefinition怎么用?Java HookDefinition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HookDefinition类属于cucumber.runtime包,在下文中一共展示了HookDefinition类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: HookDefinitionDTO
import cucumber.runtime.HookDefinition; //导入依赖的package包/类
public HookDefinitionDTO(UUID glueId, long id, HookDefinition hookDefinition) {
this.glueId = glueId;
this.id = id;
this.order = hookDefinition.getOrder();
this.location = hookDefinition.getLocation(false);
this.detailedLocation = hookDefinition.getLocation(true);
}
示例2: execute
import cucumber.runtime.HookDefinition; //导入依赖的package包/类
public HookExecutionResult execute(UUID uuid, long id, ScenarioDTO scenarioDto) throws Throwable {
SimpleGlue glue = glues.get(uuid);
Scenario scenarioAdapter = new ScenarioAdapter(scenarioDto);
HookDefinition hookDefinition = glue.hookDefinition(id);
try {
hookDefinition.execute(scenarioAdapter);
} catch (Exception e) {
return new HookExecutionResult(scenarioDto, e);
}
return new HookExecutionResult(scenarioDto);
}
示例3: matches
import cucumber.runtime.HookDefinition; //导入依赖的package包/类
public boolean matches(UUID uuid, long id, Collection<TagDTO> tags) {
SimpleGlue glue = glues.get(uuid);
HookDefinition hookDefinition = glue.hookDefinition(id);
return hookDefinition.matches(convertTags(tags));
}
示例4: addBeforeHook
import cucumber.runtime.HookDefinition; //导入依赖的package包/类
@Override
public void addBeforeHook(HookDefinition hookDefinition) {
long id = HOOK_DEF_ID_GENERATOR.incrementAndGet();
hookDefinitions.put(id, hookDefinition);
beforeHookDefinitions.put(id, hookDefinition);
}
示例5: addAfterHook
import cucumber.runtime.HookDefinition; //导入依赖的package包/类
@Override
public void addAfterHook(HookDefinition hookDefinition) {
long id = HOOK_DEF_ID_GENERATOR.incrementAndGet();
hookDefinitions.put(id, hookDefinition);
afterHookDefinitions.put(id, hookDefinition);
}
示例6: getBeforeHooks
import cucumber.runtime.HookDefinition; //导入依赖的package包/类
@Override
public List<HookDefinition> getBeforeHooks() {
List<HookDefinition> beforeHooks = new ArrayList<HookDefinition>();
beforeHooks.addAll(beforeHookDefinitions.values());
return beforeHooks;
}
示例7: getAfterHooks
import cucumber.runtime.HookDefinition; //导入依赖的package包/类
@Override
public List<HookDefinition> getAfterHooks() {
List<HookDefinition> afterHooks = new ArrayList<HookDefinition>();
afterHooks.addAll(afterHookDefinitions.values());
return afterHooks;
}
示例8: hookDefinition
import cucumber.runtime.HookDefinition; //导入依赖的package包/类
public HookDefinition hookDefinition(Long id) {
return hookDefinitions.get(id);
}
示例9: getBeforeHookDefinitions
import cucumber.runtime.HookDefinition; //导入依赖的package包/类
public Map<Long, HookDefinition> getBeforeHookDefinitions() {
return beforeHookDefinitions;
}
示例10: getAfterHookDefinitions
import cucumber.runtime.HookDefinition; //导入依赖的package包/类
public Map<Long, HookDefinition> getAfterHookDefinitions() {
return afterHookDefinitions;
}