Package de.xima.fc.e2e.environment.impl
Class FormcycleQueryExecutor
- java.lang.Object
-
- de.xima.fc.e2e.environment.impl.FormcycleQueryExecutor
-
- All Implemented Interfaces:
IFormcycleQueryExecutor,AutoCloseable
public final class FormcycleQueryExecutor extends Object implements IFormcycleQueryExecutor
Executes queries against a running FORMCYVLE app to retrieve runtime data or perform checks during at test.- Since:
- 8.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description FormcycleQueryExecutor(de.xima.e2e.test_harness_selenium.environment.api.IE2EEnvironment<IFormcycleEnvironmentLifecycleState> environment)Creates a new query executor for a formcycle app environment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()<Params extends IFormcycleQueryParams,Result extends IFormcycleQueryResult,Query extends IFormcycleQuery<Params,Result>>
List<Result>executeQuery(Class<Query> queryClass, Params params)Executes a generic query against the running formcycle app.List<FormRecordData>getAllFormRecordsByClient(long clientId)List<FormRecordData>getAllFormRecordsByForm(long clientId, long formId)
-
-
-
Constructor Detail
-
FormcycleQueryExecutor
public FormcycleQueryExecutor(de.xima.e2e.test_harness_selenium.environment.api.IE2EEnvironment<IFormcycleEnvironmentLifecycleState> environment)
Creates a new query executor for a formcycle app environment.- Parameters:
environment- E2E environment for the formcycle app.
-
-
Method Detail
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
executeQuery
public <Params extends IFormcycleQueryParams,Result extends IFormcycleQueryResult,Query extends IFormcycleQuery<Params,Result>> List<Result> executeQuery(Class<Query> queryClass, Params params) throws FormcycleQueryExecutionFailedException
Description copied from interface:IFormcycleQueryExecutorExecutes a generic query against the running formcycle app.- Specified by:
executeQueryin interfaceIFormcycleQueryExecutor- Type Parameters:
Params- Type of the query data.Result- Type of the response data.- Parameters:
queryClass- Type of the query descriptor.params- Query data to send.- Returns:
- The resulting of all responses to the query from all listeners.
- Throws:
FormcycleQueryExecutionFailedException- When the query failed to execute.
-
getAllFormRecordsByClient
public List<FormRecordData> getAllFormRecordsByClient(long clientId) throws FormcycleQueryExecutionFailedException
- Specified by:
getAllFormRecordsByClientin interfaceIFormcycleQueryExecutor- Parameters:
clientId- ID of a client.- Returns:
- A list of all form records for the given client.
- Throws:
FormcycleQueryExecutionFailedException- When the query could not be executed.
-
getAllFormRecordsByForm
public List<FormRecordData> getAllFormRecordsByForm(long clientId, long formId) throws FormcycleQueryExecutionFailedException
- Specified by:
getAllFormRecordsByFormin interfaceIFormcycleQueryExecutor- Parameters:
clientId- ID of a client.formId- The ID of a form.- Returns:
- A list of all form records for the given client and form.
- Throws:
FormcycleQueryExecutionFailedException- When the query could not be executed.
-
-