com.tngtech.jgiven.report.model
Class ReportModelBuilder

java.lang.Object
  extended by com.tngtech.jgiven.report.model.ReportModelBuilder
All Implemented Interfaces:
ScenarioListener

public class ReportModelBuilder
extends Object
implements ScenarioListener

Builds up the report model while the scenario is executed.


Constructor Summary
ReportModelBuilder()
           
ReportModelBuilder(ReportModel scenarioCollectionModel)
           
 
Method Summary
 void addStepMethod(Method paramMethod, List<NamedArgument> arguments, InvocationMode mode)
           
 ReportModel getScenarioCollectionModel()
           
 void introWordAdded(String fillWord)
           
 boolean isStepMethod(Method paramMethod)
           
 void scenarioFailed(Throwable e)
           
 void scenarioFinished()
           
 void scenarioStarted(Method method, List<NamedArgument> namedArguments)
           
 void scenarioStarted(String description)
           
 void setArguments(List<String> arguments)
           
 void setClassName(String name)
           
 void setErrorMessage(String message)
           
 void setMethodName(String methodName)
           
 void setParameterNames(List<String> parameterNames)
           
 void setReportModel(ReportModel reportModel)
           
 void setSuccess(boolean success)
           
 void setTestClass(Class<?> testClass)
           
 void stepMethodFailed(Throwable t)
           
 void stepMethodFinished(long durationInNanos)
           
 void stepMethodInvoked(Method paramMethod, List<NamedArgument> arguments, InvocationMode mode)
           
 List<Tag> toTags(Annotation annotation)
           
 void writeStep(StepModel stepModel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportModelBuilder

public ReportModelBuilder()

ReportModelBuilder

public ReportModelBuilder(ReportModel scenarioCollectionModel)
Method Detail

setReportModel

public void setReportModel(ReportModel reportModel)

scenarioStarted

public void scenarioStarted(String description)
Specified by:
scenarioStarted in interface ScenarioListener

addStepMethod

public void addStepMethod(Method paramMethod,
                          List<NamedArgument> arguments,
                          InvocationMode mode)

introWordAdded

public void introWordAdded(String fillWord)
Specified by:
introWordAdded in interface ScenarioListener

writeStep

public void writeStep(StepModel stepModel)

stepMethodInvoked

public void stepMethodInvoked(Method paramMethod,
                              List<NamedArgument> arguments,
                              InvocationMode mode)
Specified by:
stepMethodInvoked in interface ScenarioListener

isStepMethod

public boolean isStepMethod(Method paramMethod)

setMethodName

public void setMethodName(String methodName)

setArguments

public void setArguments(List<String> arguments)

setParameterNames

public void setParameterNames(List<String> parameterNames)

setClassName

public void setClassName(String name)

setSuccess

public void setSuccess(boolean success)

setErrorMessage

public void setErrorMessage(String message)

getScenarioCollectionModel

public ReportModel getScenarioCollectionModel()

stepMethodFailed

public void stepMethodFailed(Throwable t)
Specified by:
stepMethodFailed in interface ScenarioListener

stepMethodFinished

public void stepMethodFinished(long durationInNanos)
Specified by:
stepMethodFinished in interface ScenarioListener

scenarioFailed

public void scenarioFailed(Throwable e)
Specified by:
scenarioFailed in interface ScenarioListener

scenarioStarted

public void scenarioStarted(Method method,
                            List<NamedArgument> namedArguments)
Specified by:
scenarioStarted in interface ScenarioListener

toTags

public List<Tag> toTags(Annotation annotation)

scenarioFinished

public void scenarioFinished()
Specified by:
scenarioFinished in interface ScenarioListener

setTestClass

public void setTestClass(Class<?> testClass)


Copyright © 2014 TNG Technology Consulting. All rights reserved.