public abstract class ScenarioFrameListener extends Object implements INodeListener
| Modifier and Type | Field and Description |
|---|---|
static String |
ATT_EXECUTE
Expected style for scenario execute priority.
|
protected int |
checkpoint
A checkpoint where in the general result the scenario starts.
|
static String |
CSS_SCENARIO
Expected style for scenarios.
|
static String |
CSS_SCENARIO_FAILURE
Expected style for failure scenarios.
|
static String |
CSS_SCENARIO_IGNORED
Expected style for pending scenarios.
|
static String |
CSS_SCENARIO_PENDING
Expected style for pending scenarios.
|
static String |
CSS_SCENARIO_SUCCESS
Expected style for success scenarios.
|
static String |
CSS_TITLE
Expected style for scenario titles.
|
protected Boolean |
execute
Check if execute should be prioritized.
|
static String |
FEATURE_EXECUTE_ENABLED
Feature to accept execute for scenarios.
|
static String |
FEATURE_SHOW_TIME
Feature to show time for scenarios.
|
protected INodeHolder |
holder
An auxiliary node holder.
|
protected boolean |
ignored
Indicate if scenario is ignored.
|
protected IScenarioListener[] |
listeners
Scenario listeners.
|
protected String |
name
The listener name.
|
protected ENext |
next
Result of
onBefore(...). |
protected boolean |
pending
Indicate if scenario is pending.
|
protected nu.xom.Node |
scenario
The node which holds the scenario.
|
protected long |
startTime
Time scenario has started.
|
protected IResultSet |
subset
The subset of general result for this scenario.
|
protected nu.xom.Node |
title
The node which holds the title.
|
static String |
TITLE_TREE_SEPARATOR
Separator for sub scenario names.
|
| Constructor and Description |
|---|
ScenarioFrameListener(String name,
Boolean execute,
IScenarioListener... listeners)
Creates a names scenario listener.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
fireAfter(String title,
nu.xom.Node node,
IContext context,
IResultSet result,
Object instance)
Fire listeners after scenarios.
|
protected void |
fireBefore(String title,
nu.xom.Node node,
IContext context,
IResultSet result,
Object instance)
Fire listeners before scenarios.
|
abstract Object |
getInstance()
The fixture instance.
|
String |
getName()
The listener name.
|
IResultSet |
getResult()
Get the result subset specific to this scenario.
|
static int |
getScenarioLevel(String title)
Get scenario level based on its title.
|
static String |
getScenarioPath(nu.xom.Node nt)
Get full pathname for scenario.
|
boolean |
isIgnored()
Answer if the scenario is ignored.
|
boolean |
isPending()
Answer if the scenario is pending.
|
void |
onAfter(nu.xom.Node node,
IContext context,
IResultSet result)
Perform some action after plugin execution for a given node.
|
ENext |
onBefore(nu.xom.Node node,
IContext context,
IResultSet result)
Perform some action before building plugin for a given node.
|
void |
reset()
Reset listener state.
|
public static final String FEATURE_SHOW_TIME
public static final String FEATURE_EXECUTE_ENABLED
public static final String CSS_SCENARIO
public static final String CSS_SCENARIO_SUCCESS
public static final String CSS_SCENARIO_FAILURE
public static final String CSS_SCENARIO_PENDING
public static final String CSS_SCENARIO_IGNORED
public static final String CSS_TITLE
public static final String TITLE_TREE_SEPARATOR
public static final String ATT_EXECUTE
protected String name
protected Boolean execute
protected IScenarioListener[] listeners
protected INodeHolder holder
protected ENext next
onBefore(...).protected nu.xom.Node scenario
protected nu.xom.Node title
protected long startTime
protected int checkpoint
protected boolean pending
protected boolean ignored
protected IResultSet subset
public ScenarioFrameListener(String name, Boolean execute, IScenarioListener... listeners)
name - The scenario.execute - Check if execute is enabled.listeners - List of scenario listeners.public abstract Object getInstance()
public void reset()
ISpecRunnerListenerreset in interface ISpecRunnerListenerpublic String getName()
ISpecRunnerListenergetName in interface ISpecRunnerListenerpublic static String getScenarioPath(nu.xom.Node nt) throws PluginException
nt - The child node.PluginException - On lookup errors.public static int getScenarioLevel(String title)
title - A title.public ENext onBefore(nu.xom.Node node, IContext context, IResultSet result)
INodeListeneronBefore in interface INodeListenernode - The node.context - The context.result - The result.ENext.DEEP,
the execution should go deeper.protected void fireBefore(String title, nu.xom.Node node, IContext context, IResultSet result, Object instance) throws SpecRunnerException
title - The scenario title.node - The scenario node.context - The test context.result - The result set.instance - The fixture object, if it exists, null, otherwise.SpecRunnerException - On event errors.public void onAfter(nu.xom.Node node,
IContext context,
IResultSet result)
INodeListeneronAfter in interface INodeListenernode - The node.context - The context.result - The result.protected void fireAfter(String title, nu.xom.Node node, IContext context, IResultSet result, Object instance) throws SpecRunnerException
title - The scenario title.node - The scenario node.context - The test context.result - The result set.instance - The fixture object, if it exists, null, otherwise.SpecRunnerException - On event errors.public boolean isPending()
public boolean isIgnored()
public IResultSet getResult()
Copyright © 2016. All rights reserved.