Class MockVoBuilder
Provides a mock entity value object creation service for unit testing.
- Since:
- 5.0.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionCreate a test form entity with a random name.createForm(String clientName, String formName, String portalName) Create a test form entity with the given name.createFuncParam(String triggerType, String formStatus, SvcDef svcDef, Map<String, String> testParams) Creates a FuncParam with the given trigger type, transaction form status, service definition and test parameters.Create an Job with a status of 'In Progress'.createJobInProgressWithXml(String formXmlData) Create an Job with a status of 'In Progress', and a start submission with the given form XML data.com.avoka.fc.core.entity.PortalCreate a test portal with a random name;com.avoka.fc.core.entity.PortalcreatePortal(String portalName) Create a test portal for a given name.Create a completed transaction entity with the given form.createTxnCompletedWithFormAndXml(Form form, String formXmlData) Create a completed transaction entity with the given form and XML form data.createTxnCompletedWithXml(String formXmlData) Create a completed transaction entity with the given XML form data.createTxnDeliveryReadyWithXml(String formXmlData) Create a completed transaction entity with the given form and XML form data.Create a opened transaction entity.createTxnSavedWithXml(String formXmlData) Create a saved transaction entity with the given XML form data.createTxnSavedWithXml(String clientName, String formXmlData) Create a saved transaction entity with the given XML form data and Client Name.Create a submitted transaction entity with the given form.createTxnSubmittedWithFormAndXml(Form form, String formXmlData) Create a submitted transaction entity with the given form and XML form data.createTxnSubmittedWithXml(String formXmlData) Create a submitted transaction entity with the given XML form data.createTxnTaskWithXml(String formXmlData) Create an assigned Submission form task entity with the given XML form data.createTxnTaskWithXml(String clientName, String formXmlData) Create an assigned Submission form task entity with the given XML and client name.Create a local type user with a random login name.Create a SSO type user with a random login name.com.avoka.fc.core.entity.ClientGet or create a test client.com.avoka.fc.core.entity.ClientgetOrCreateClient(String clientName) Get or create a client for a given name
- 
Constructor Details- 
MockVoBuilderpublic MockVoBuilder()
 
- 
- 
Method Details- 
createFuncParampublic FuncParam createFuncParam(String triggerType, String formStatus, SvcDef svcDef, Map<String, 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
 
- 
createTxnOpenedCreate 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
 
- 
createTxnSavedWithXmlCreate 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
 
- 
createTxnSavedWithXmlCreate a saved transaction entity with the given XML form data and Client Name. The transaction record will have the status values:Form Status: Saved Receipt Status: null Delivery Status: Not Ready - Parameters:
- clientName- Name of client
- formXmlData- the form XML data for the transaction
- Returns:
- a saved transaction entity with the given XML form data
 
- 
createTxnTaskWithXmlCreate 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
 
- 
createTxnTaskWithXmlCreate an assigned Submission form task entity with the given XML and client name. The transaction record will have the status values:Form Status: Assigned Task Type: Form Receipt Status: null Delivery Status: Not Ready- Parameters:
- clientName- Name of client
- formXmlData- the form XML data for the transaction
- Returns:
- a assigned task transaction value object
 
- 
createTxnSubmittedWithXmlCreate 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
 
- 
createTxnSubmittedWithFormAndXmlCreate 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
 
- 
createTxnSubmittedWithFormAndXmlCreate 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
 
- 
createTxnCompletedWithXmlCreate 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
 
- 
createTxnCompletedWithFormAndXmlCreate 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
 
- 
createTxnCompletedWithFormAndXmlCreate 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
 
- 
createTxnDeliveryReadyWithXmlCreate 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
 
- 
createJobInProgressCreate an Job with a status of 'In Progress'.- Returns:
- a new Job with a status of 'In Progress'
 
- 
createJobInProgressWithXmlCreate 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'
 
- 
getOrCreateClientpublic com.avoka.fc.core.entity.Client getOrCreateClient()Get or create a test client.- Returns:
- a test client.
 
- 
getOrCreateClientGet or create a client for a given name- Parameters:
- clientName- Name of client
- Returns:
- a test client
 
- 
createPortalCreate a test portal for a given name.- Parameters:
- portalName- Portal name.
- Returns:
- a test portal.
 
- 
createPortalpublic com.avoka.fc.core.entity.Portal createPortal()Create a test portal with a random name;- Returns:
- a test portal.
 
- 
createFormCreate a test form entity with a random name.- Returns:
- test form entity with a random name.
 
- 
createFormCreate a test form entity with the given name.- Parameters:
- clientName- Client Name (Required)
- formName- Form Name
- portalName- Portal Name
- Returns:
- test form entity.
 
- 
createUserLocalCreate a local type user with a random login name.- Returns:
- local type user with a random login name
 
- 
createUserSsoCreate a SSO type user with a random login name.- Returns:
- SSO type user with a random login name
 
 
-