本文整理匯總了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;
}