R - the model typeprotected static class AbstractTest.EqualitySetup<R extends IModel>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private boolean |
enableEquals |
private java.lang.Integer |
expectedFailCode |
private java.lang.String |
expectedFailReason |
private java.lang.String |
expectedName |
private java.io.File |
expectedOutputFile |
private java.io.File |
expectedTrace |
private java.lang.String |
expectedVersion |
private java.io.File |
file |
private R |
model |
private java.util.Map<java.lang.String,java.lang.Object> |
parameter |
private java.lang.String |
startElement |
| Constructor and Description |
|---|
EqualitySetup(java.io.File file,
java.lang.String expectedName,
java.lang.String expectedVersion)
Creates an instance with no trace output and empty parameters.
|
EqualitySetup(java.io.File file,
java.lang.String expectedName,
java.lang.String expectedVersion,
java.io.File expectedTrace)
Creates an instance with empty parameters.
|
EqualitySetup(java.io.File file,
java.lang.String expectedName,
java.lang.String expectedVersion,
java.io.File expectedTrace,
java.util.Map<java.lang.String,java.lang.Object> parameter)
Creates an instance with empty parameters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
enableEquals()
Returns wehther equal comparison shall be enabled.
|
java.lang.Integer |
getExpectedFailCode()
The expected failure code.
|
java.lang.String |
getExpectedFailReason()
Returns the expected fail reason (if the execution failed).
|
java.lang.String |
getExpectedName()
Returns the expected name of the model.
|
java.io.File |
getExpectedOutputFile()
Returns the file containing the expected output.
|
java.io.File |
getExpectedTrace()
Returns the file containing the expected execution trace.
|
java.lang.String |
getExpectedVersion()
Returns the expected version of the model.
|
java.io.File |
getFile()
Returns the file containing the model.
|
R |
getModel()
Returns the (overriding) model.
|
java.util.Map<java.lang.String,java.lang.Object> |
getParameter()
Returns the parameter mappings, i.e., the name of the top-level
input parameter and their individual values.
|
java.lang.String |
getStartElement()
Returns the name of the start element for execution.
|
void |
setEnableEquals(boolean enableEquals)
Enables or disables the actual equals test and passes through to execution.
|
void |
setExpectedFailCode(java.lang.Integer failCode)
Defines an optional expected failure code.
|
void |
setExpectedFailReason(java.lang.String failReason)
Sets an optional reason for expected execution failure.
|
void |
setExpectedOutputFile(java.io.File expectedOutputFile)
Defines the file containing the expected output.
|
void |
setModel(R model)
Sets the (overriding) model.
|
void |
setStartElement(java.lang.String startElement)
Changes the name of the start element for execution.
|
private java.io.File file
private java.lang.String expectedName
private java.lang.String expectedVersion
private java.lang.String startElement
private java.io.File expectedTrace
private java.util.Map<java.lang.String,java.lang.Object> parameter
private java.io.File expectedOutputFile
private boolean enableEquals
private java.lang.Integer expectedFailCode
private java.lang.String expectedFailReason
public EqualitySetup(java.io.File file,
java.lang.String expectedName,
java.lang.String expectedVersion)
file - the file containing the modelexpectedName - the expected name of (at least one) containing project,
(may be null to disable check)expectedVersion - the expected version of expectedNamepublic EqualitySetup(java.io.File file,
java.lang.String expectedName,
java.lang.String expectedVersion,
java.io.File expectedTrace)
file - the file containing the modelexpectedName - the expected name of (at least one) containing project,
(may be null to disable check)expectedVersion - the expected version of expectedNameexpectedTrace - the expected execution trace (may be null
if only parsing shall be tested)public EqualitySetup(java.io.File file,
java.lang.String expectedName,
java.lang.String expectedVersion,
java.io.File expectedTrace,
java.util.Map<java.lang.String,java.lang.Object> parameter)
file - the file containing the modelexpectedName - the expected name of (at least one) containing project,
(may be null to disable check)expectedVersion - the expected version of expectedNameexpectedTrace - the expected execution trace (may be null
if only parsing shall be tested)parameter - mappingpublic void setModel(R model)
model - the model (may be null for none)public R getModel()
public java.io.File getFile()
public java.lang.String getExpectedName()
public java.lang.String getExpectedVersion()
public java.io.File getExpectedTrace()
public java.util.Map<java.lang.String,java.lang.Object> getParameter()
public java.lang.String getStartElement()
public void setStartElement(java.lang.String startElement)
startElement - the new name of the start elementpublic java.io.File getExpectedOutputFile()
public void setExpectedOutputFile(java.io.File expectedOutputFile)
expectedOutputFile - the file containing the expected outputpublic boolean enableEquals()
true if enabled, false elsepublic void setEnableEquals(boolean enableEquals)
enableEquals - whether equals shall be enabled (default true)public void setExpectedFailReason(java.lang.String failReason)
failReason - the reason for failing (may be null for none)public java.lang.String getExpectedFailReason()
public void setExpectedFailCode(java.lang.Integer failCode)
failCode - the failure codepublic java.lang.Integer getExpectedFailCode()
Copyright © 2009 - 2018 SSE. All Rights Reserved.