ITest Api Interface
Provide method for asserting some condition
Definition
Namespace: Casewhere.Runtime.DSL.Api
Assembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.9.8.6
Assembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.9.8.6
C#
public interface ITestApiMethods
| CleanAll |
Clear all dummy data created while running the workflow unit test.
ExampleC# |
| Create(String, String) | Create a Dummy Data Object and persist it to the database. The system will automatically clean up the data object after the test is finished |
| Create(String, Object, String) | Persist a Data Object in the database. The system will automatically clean up the data object after the test is finished. |
| CreateDocumentUploadSession | Create new document upload session with corresponding workflow, activity and document upload component name. This API is recommended to be called inside OnExecuting method. |
| False |
Verifies that an expression is false.
ExampleC# |
| Get(String) | Get a dummy data object from the cache. This is useful for mocking data while writing a workflow unit test. |
| Get(String, String) | Get value object by name in a workflow. |
| GetT(String) | Get a dummy data object from the cache. This is useful for mocking data while writing a workflow unit test. |
| GetT(String, String) | Get value by name in a workflow. |
| IsActivityCompleted |
Evaluate whether the activity is completed or not
ExampleC# |
| IsActivityEditable |
Evaluate whether the activity is editable or not
ExampleC# |
| IsActivityIncluded |
Evaluate whether the activity is included or not
ExampleC# |
| IsFormFieldEnabled |
Evaluate whether the form field is enable or not
ExampleC# |
| IsFormFieldReadonly |
Evaluate whether the form field is readonly or not
ExampleC# |
| IsFormFieldRequired |
Evaluate whether the form field is required or not
ExampleC# |
| IsFormFieldVisible |
Evaluate whether the form field is visible or not
ExampleC# |
| IsWorkflowCompleted | Evaluate whether the workflow is completed or not |
| New(String, String) |
Generate data class object and can be set to the cache
ExampleC# |
| NewT(String) |
Generate value primitive data types and can be set to the cache
ExampleC# |
| OnExecuted | Register an action to be invoked when the specific workflow executed. |
| OnExecuting | Register an action to be invoked when the specific workflow activity starts executing. |
| Ref | Get the data object is being referenced in a workflow. |
| Replace | Replace the value in the cache. This is useful for mocking data while writing a workflow unit test. |
| Set | Set a dummy data object into the cache. This is useful for mocking data while writing a workflow unit test. |
| SimulatePluginInvocation | Invoke a plugin method. This method cannot work with legacy plugins. |
| Submit | Simulating form submission |
| True |
Verifies that an expression is true.
ExampleC# |