csheets.ext.test
Class TestCaseBuilder

java.lang.Object
  extended by csheets.core.formula.util.ExpressionBuilder
      extended by csheets.ext.test.TestCaseBuilder
All Implemented Interfaces:
ExpressionVisitor

public class TestCaseBuilder
extends ExpressionBuilder

An expression visitor that creates the expression for a test case, by replacing references with test case parameters.

Author:
Einar Pehrson

Constructor Summary
TestCaseBuilder(Set<TestCaseParam> params)
          Creates a new reference replacer, that converts the given expression to a test case using the given set of test case parameters
 
Method Summary
 Expression visitReference(Reference reference)
          Replaces the reference with the appropriate test case parameter(s).
 
Methods inherited from class csheets.core.formula.util.ExpressionBuilder
getExpression, visitBinaryOperation, visitFunctionCall, visitLiteral, visitUnaryOperation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestCaseBuilder

public TestCaseBuilder(Set<TestCaseParam> params)
Creates a new reference replacer, that converts the given expression to a test case using the given set of test case parameters

Parameters:
params - the parameters of which the test case consists
Method Detail

visitReference

public Expression visitReference(Reference reference)
Replaces the reference with the appropriate test case parameter(s).

Specified by:
visitReference in interface ExpressionVisitor
Overrides:
visitReference in class ExpressionBuilder
Parameters:
reference - the reference to visit
Returns:
an arbitrary object