
org.jnario.report.ExecutableStateSwitch Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.jnario.standalone Show documentation
Show all versions of org.jnario.standalone Show documentation
The required libraries to execute Jnario specifications without Eclipse.
The newest version!
package org.jnario.report;
public abstract class ExecutableStateSwitch {
public T doSwitch(SpecExecution execution){
T result = null;
if (execution instanceof Failed) {
result = handleFailed((Failed) execution);
}else if (execution instanceof NotRun) {
result = handleNotRun((NotRun) execution);
}else if (execution instanceof Passed) {
result = handlePassed((Passed) execution);
}else if (execution instanceof Pending) {
result = handlePending((Pending) execution);
}
return result;
}
protected abstract T handlePassed(Passed execution);
protected abstract T handlePending(Pending execution);
protected abstract T handleNotRun(NotRun execution);
protected abstract T handleFailed(Failed execution);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy