public class MockVoBuilder
extends java.lang.Object
Provides a mock entity value object creation service for unit testing.
- Since:
- 5.0.0
Constructor Summary
Constructors
Constructor |
Description |
MockVoBuilder() |
|
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type |
Method |
Description |
Form |
createForm() |
Create a test form entity with a random name.
|
FuncParam |
createFuncParam(java.lang.String triggerType,
java.lang.String formStatus,
SvcDef svcDef,
java.util.Map<java.lang.String,java.lang.String> testParams)
|
Creates a FuncParam with the given trigger type, transaction form
status, service definition and test parameters.
|
Job |
createJobInProgress() |
Create an Job with a status of 'In Progress'.
|
Job |
createJobInProgressWithXml(java.lang.String formXmlData)
|
Create an Job with a status of 'In Progress', and a start submission
with the given form XML data.
|
Txn |
createTxnCompletedWithFormAndXml(Form form) |
Create a completed transaction entity with the given form.
|
Txn |
createTxnCompletedWithFormAndXml(Form form,
java.lang.String formXmlData)
|
Create a completed transaction entity with the given form and XML form
data.
|
Txn |
createTxnCompletedWithXml(java.lang.String formXmlData)
|
Create a completed transaction entity with the given XML form data.
|
Txn |
createTxnDeliveryReadyWithXml(java.lang.String formXmlData)
|
Create a completed transaction entity with the given form and XML form
data.
|
Txn |
createTxnOpened() |
Create a opened transaction entity.
|
Txn |
createTxnSavedWithXml(java.lang.String formXmlData) |
Create a saved transaction entity with the given XML form data.
|
Txn |
createTxnSubmittedWithFormAndXml(Form form) |
Create a submitted transaction entity with the given form.
|
Txn |
createTxnSubmittedWithFormAndXml(Form form,
java.lang.String formXmlData)
|
Create a submitted transaction entity with the given form and XML form
data.
|
Txn |
createTxnSubmittedWithXml(java.lang.String formXmlData)
|
Create a submitted transaction entity with the given XML form data.
|
Txn |
createTxnTaskWithXml(java.lang.String formXmlData) |
Create an assigned Submission form task entity with the given XML form
data.
|
User |
createUserLocal() |
Create a local type user with a random login name.
|
User |
createUserSso() |
Create a SSO type user with a random login name.
|
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
wait, wait, wait
Constructor Detail
MockVoBuilder
public MockVoBuilder()
Method Detail
createFuncParam
public FuncParam createFuncParam(java.lang.String triggerType,
java.lang.String formStatus,
SvcDef svcDef,
java.util.Map<java.lang.String,java.lang.String> testParams)
Creates a FuncParam with the given trigger type, transaction form status,
service definition and test parameters. This method will also create the
following FuncParam attributes: trigger - using provided trigger type appDoc -
document using the svcDef 'Test XML Data' params - empty parameters map request
- mock request object svcDef - using the provided service definition txn - with
"Saved" form status user - null user object
- Parameters:
triggerType
- the function trigger type (required)
formStatus
- the transaction form status (required)
svcDef
- the associated service definition (required)
testParams
- the unit test parameters (optional)
- Returns:
- a function parameter object
- Since:
- 17.10.3
createTxnOpened
public Txn createTxnOpened()
Create a opened transaction entity. This is useful for mocking up Dynamic Data
calls. The transaction record will have the status values:
Form Status: Opened
Receipt Status: null
Delivery Status: Not Ready
- Returns:
- a opened transaction value object
createTxnSavedWithXml
public Txn createTxnSavedWithXml(java.lang.String formXmlData)
Create a saved transaction entity with the given XML form data. The transaction
record will have the status values:
Form Status: Saved
Receipt Status: null
Delivery Status: Not Ready
- Parameters:
formXmlData
- the form XML data for the transaction
- Returns:
- a saved transaction entity with the given XML form data
createTxnTaskWithXml
public Txn createTxnTaskWithXml(java.lang.String formXmlData)
Create an assigned Submission form task entity with the given XML form data. The
transaction record will have the status values:
Form Status: Assigned
Task Type: Form
Receipt Status: null
Delivery Status: Not Ready
- Parameters:
formXmlData
- the form XML data for the transaction
- Returns:
- a assigned task transaction value object
createTxnSubmittedWithXml
public Txn createTxnSubmittedWithXml(java.lang.String formXmlData)
Create a submitted transaction entity with the given XML form data. The
transaction record will have the status values:
Form Status: Submitted
Receipt Status: null
Delivery Status: Not Ready
- Parameters:
formXmlData
- the form XML data for the transaction
- Returns:
- a completed transaction value object
createTxnSubmittedWithFormAndXml
public Txn createTxnSubmittedWithFormAndXml(Form form,
java.lang.String formXmlData)
Create a submitted transaction entity with the given form and XML form data. The
transaction record will have the status values:
Form Status: Completed
Receipt Status: null
Delivery Status: Not Ready
If the form has form data extract mappings configured, then submission data
extracts will be created against the transaction.
- Parameters:
form
- the transaction form (required)
-
formXmlData
- the form XML data for the transaction (required)
- Returns:
- a completed transaction value object
- Since:
- 5.0.0
createTxnSubmittedWithFormAndXml
public Txn createTxnSubmittedWithFormAndXml(Form form)
Create a submitted transaction entity with the given form. The transaction
record will have the status values:
Form Status: Completed
Receipt Status: null
Delivery Status: Not Ready
If the form has form data extract mappings configured, then submission data
extracts will be created against the transaction.
- Parameters:
form
- the transaction form (required)
- Returns:
- a completed transaction value object
- Since:
- 5.1.0
createTxnCompletedWithXml
public Txn createTxnCompletedWithXml(java.lang.String formXmlData)
Create a completed transaction entity with the given XML form data. The
transaction record will have the status values:
Form Status: Completed
Receipt Status: Ready
Delivery Status: Not Ready
- Parameters:
formXmlData
- the form XML data for the transaction
- Returns:
- a completed transaction value object
createTxnCompletedWithFormAndXml
public Txn createTxnCompletedWithFormAndXml(Form form,
java.lang.String formXmlData)
Create a completed transaction entity with the given form and XML form data. The
transaction record will have the status values:
Form Status: Completed
Receipt Status: null
Delivery Status: Not Ready
If the form has form data extract mappings configured, then submission data
extracts will be created against the transaction.
- Parameters:
form
- the transaction form (required)
-
formXmlData
- the form XML data for the transaction (required)
- Returns:
- a completed transaction value object
createTxnCompletedWithFormAndXml
public Txn createTxnCompletedWithFormAndXml(Form form)
Create a completed transaction entity with the given form. The transaction
record will have the status values:
Form Status: Completed
Receipt Status: null
Delivery Status: Not Ready
If the form has form data extract mappings configured, then submission data
extracts will be created against the transaction.
- Parameters:
form
- the transaction form (required)
- Returns:
- a completed transaction value object
- Since:
- 5.1.0
createTxnDeliveryReadyWithXml
public Txn createTxnDeliveryReadyWithXml(java.lang.String formXmlData)
Create a completed transaction entity with the given form and XML form data. The
transaction record will have the status values:
Form Status: Completed
Receipt Status: Completed
Delivery Status: Ready
- Parameters:
formXmlData
- the form XML data for the transaction
- Returns:
- a completed transaction value object
createJobInProgress
public Job createJobInProgress()
Create an Job with a status of 'In Progress'.
- Returns:
- a new Job with a status of 'In Progress'
createJobInProgressWithXml
public Job createJobInProgressWithXml(java.lang.String formXmlData)
Create an Job with a status of 'In Progress', and a start submission with the
given form XML data.
- Parameters:
-
formXmlData
- the form XML data for the transaction (required)
- Returns:
- a new Job with a status of 'In Progress'
createForm
public Form createForm()
Create a test form entity with a random name.
- Returns:
- test form entity with a random name.
createUserLocal
public User createUserLocal()
Create a local type user with a random login name.
- Returns:
- local type user with a random login name
createUserSso
public User createUserSso()
Create a SSO type user with a random login name.
- Returns:
- SSO type user with a random login name