Class AbstractYFormFacadeKeywords
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.ServicelayerTest
de.hybris.platform.xyformsfacades.integrationtests.AbstractYFormFacadeKeywords
- All Implemented Interfaces:
JaloSessionHolder
- Direct Known Subclasses:
DynamicAttributeTest,YFormDefinitionAutosaveTest,YFormDefinitionVersioningTest,YFormsIntegrationTest,YFormsTest
Keywords from the old ATDD tests - now called from Spring tests
-
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importServiceFields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateOrUpdateYFormData(String applicationId, String formId, String formDataId, String refId, String formDataBody) Create or Update YFormDataModel.createOrUpdateYFormDataWithType(String applicationId, String formId, String formDataId, String formDataType, String formDataBody) Create or Update YFormDataModel.Create YFormData is not previous existed.createYFormDefinition(String applicationId, String formId, String body) Create a new YFormDefinition by the given parameters.getYFormData(String formDataId) For a given id a form data is returned.getYFormDefinitionFromTemplate(String applicationId, String formId, String content) updateYFormDataById(String formDataId, String formDataBody) Update YFormData by the given FormDataIdupdateYFormDefinition(String applicationId, String formId, String body) Update YFormDefinition if it is existed in the database.voidverifyCategoryHasAllYFormDefinitions(String categoryCode, String... formDefinitionIds) voidverifyProductHasAllYFormDefinitions(String productCode, String... formDefinitionIds) voidverifyReturnsAllYFormDefinitionDataForProduct(String productCode, String... formDefinitionIds) Verify that yFormFacade return all the YFormDefitionData that relate to the product specifiedvoidverifyThrowsExceptionWhenProductDoesNotExistWhenGetYFormDefinitionDataForProduct(String productCode) Verify that YFormServiceException is thrown when tries to return all the YFormDefitionData that relate to the product, but product does notvoidverifyYFormDataExists(String formDataId) Verify YForm Data existedvoidverifyYFormDataExists(String formDataId, String refId, String content) Verify YForm Data existed with given attribute valuesvoidverifyYFormDataHistoryCreated(String formDataId) Verify the YForm Data History has been created for YFrom Data change.voidverifyYFormDataNotExistedOnUpdateThrowsException(String formDataId, String formDataBody, String exception) For a not previously existed yform data with given formDataId will throw exception.voidverifyYFormDataNotExistedThrowsException(String formDataId, String exception) For a not previously existed yform definition with given applicationId and formId will throw exception.voidverifyYFormDataUpdated(String formDataId, String updatedBody) Verify the YForm Data has been updated.voidverifyYFormDataWithTypeExists(String formDataId, String formDataType) Verify YForm Data existedvoidverifyYFormDataWithTypeNotExistedThrowsException(String formDataId, String formDataType, String exception) For a not previously existed yform definition with given applicationId and formId will throw exception.voidverifyYFormDefinitionExists(String applicationId, String formId) Verify for a given applicationId and formId a form definition is returned.voidverifyYFormDefinitionNotExistedOnUpdateThrowsException(String applicationId, String formId, String body, String exception) For a not previously existed yform definition with given applicationId and formId will throw exception.voidverifyYFormDefinitionNotExistedThrowsException(String applicationId, String formId, String exception) For a not previously existed yform definition with given applicationId and formId will throw exception.voidverifyYFormDefinitionUpdated(String applicationId, String formId, String updatedBody) Verify the YForm Definition has been updated.voidverifyYFormDefinitionWithFormDataId(String formDataId, String applicationId, String formId, String version, String content) Verify for a given form data id: applicationId, formId, version number and content are verifiedvoidverifyYFormDefinitionWithVersionExists(String applicationId, String formId, String version) Verify for a given applicationId and formId a form definition is returned.voidverifyYFormDefinitionWithVersionNotExistedThrowsException(String applicationId, String formId, String version, String exception) For a not previously existed yform definition with given applicationId and formId will throw exception.voidverifyYFormDefinitionWithVersionUpdated(String applicationId, String formId, String version, String updatedBody) Verify the YForm Definition has been updated.Methods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNoneMethods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSessionMethods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
Constructor Details
-
AbstractYFormFacadeKeywords
public AbstractYFormFacadeKeywords()
-
-
Method Details
-
getYFormDefinitionFromTemplate
-
verifyYFormDefinitionExists
Verify for a given applicationId and formId a form definition is returned.- Parameters:
applicationId-formId-
-
verifyYFormDefinitionWithVersionExists
public void verifyYFormDefinitionWithVersionExists(String applicationId, String formId, String version) Verify for a given applicationId and formId a form definition is returned.- Parameters:
applicationId-formId-version-
-
verifyYFormDefinitionNotExistedThrowsException
public void verifyYFormDefinitionNotExistedThrowsException(String applicationId, String formId, String exception) For a not previously existed yform definition with given applicationId and formId will throw exception.- Parameters:
applicationId-formId-exception-
-
verifyYFormDefinitionWithVersionNotExistedThrowsException
public void verifyYFormDefinitionWithVersionNotExistedThrowsException(String applicationId, String formId, String version, String exception) For a not previously existed yform definition with given applicationId and formId will throw exception.- Parameters:
applicationId-formId-exception-
-
createYFormDefinition
Create a new YFormDefinition by the given parameters.
The applicationId should be a existed Catalog, or an exception will be thrown with catalog not available message.- Parameters:
applicationId-formId-body-- Returns:
- YFormDefinitionData
-
updateYFormDefinition
Update YFormDefinition if it is existed in the database. Catch AmbiguousIdentifierException and throws YFormServiceException with corresponding error messages on retrieval from the DAO.- Parameters:
applicationId-formId-body-- Returns:
- YFormDefinitionData
-
verifyYFormDefinitionNotExistedOnUpdateThrowsException
public void verifyYFormDefinitionNotExistedOnUpdateThrowsException(String applicationId, String formId, String body, String exception) For a not previously existed yform definition with given applicationId and formId will throw exception.- Parameters:
applicationId-formId-body-exception-
-
verifyYFormDefinitionUpdated
Verify the YForm Definition has been updated.- Parameters:
applicationId-formId-updatedBody-
-
verifyYFormDefinitionWithVersionUpdated
public void verifyYFormDefinitionWithVersionUpdated(String applicationId, String formId, String version, String updatedBody) Verify the YForm Definition has been updated.- Parameters:
applicationId-formId-updatedBody-
-
getYFormData
For a given id a form data is returned.- Parameters:
formDataId-- Returns:
- YFormDataData
-
verifyYFormDataExists
Verify YForm Data existed- Parameters:
formDataId-
-
verifyYFormDataWithTypeExists
Verify YForm Data existed- Parameters:
formDataId-formDataType-
-
verifyYFormDataExists
Verify YForm Data existed with given attribute values- Parameters:
formDataId-
-
verifyYFormDataNotExistedThrowsException
For a not previously existed yform definition with given applicationId and formId will throw exception.- Parameters:
formDataId-exception-
-
verifyYFormDataWithTypeNotExistedThrowsException
public void verifyYFormDataWithTypeNotExistedThrowsException(String formDataId, String formDataType, String exception) For a not previously existed yform definition with given applicationId and formId will throw exception.- Parameters:
formDataId-formDataType-exception-
-
createYFormData
public YFormDataData createYFormData(String applicationId, String formId, String formDataId, String refId, String body) Create YFormData is not previous existed. And assign to the corresponding YFormDefinition.- Parameters:
applicationId-formId-formDataId-body-- Returns:
- YFormDataData
-
updateYFormDataById
Update YFormData by the given FormDataId- Parameters:
formDataId-formDataBody-- Returns:
- YFormDataData
-
verifyYFormDataNotExistedOnUpdateThrowsException
public void verifyYFormDataNotExistedOnUpdateThrowsException(String formDataId, String formDataBody, String exception) For a not previously existed yform data with given formDataId will throw exception.- Parameters:
formDataId-formDataBody-exception-
-
verifyYFormDataUpdated
Verify the YForm Data has been updated.- Parameters:
formDataId-updatedBody-
-
verifyYFormDataHistoryCreated
Verify the YForm Data History has been created for YFrom Data change.- Parameters:
formDataId-
-
createOrUpdateYFormData
public YFormDataData createOrUpdateYFormData(String applicationId, String formId, String formDataId, String refId, String formDataBody) Create or Update YFormDataModel.- Parameters:
applicationId-formId-formDataId-formDataBody-- Returns:
- YFormDataData
-
createOrUpdateYFormDataWithType
public YFormDataData createOrUpdateYFormDataWithType(String applicationId, String formId, String formDataId, String formDataType, String formDataBody) Create or Update YFormDataModel.- Parameters:
applicationId-formId-formDataId-formDataType-formDataBody-- Returns:
- YFormDataData
-
verifyReturnsAllYFormDefinitionDataForProduct
public void verifyReturnsAllYFormDefinitionDataForProduct(String productCode, String... formDefinitionIds) Verify that yFormFacade return all the YFormDefitionData that relate to the product specified- Parameters:
productCode-formDefinitionIds- in format of "applicationId:formId"
-
verifyThrowsExceptionWhenProductDoesNotExistWhenGetYFormDefinitionDataForProduct
public void verifyThrowsExceptionWhenProductDoesNotExistWhenGetYFormDefinitionDataForProduct(String productCode) Verify that YFormServiceException is thrown when tries to return all the YFormDefitionData that relate to the product, but product does not- Parameters:
productCode-
-
verifyYFormDefinitionWithFormDataId
public void verifyYFormDefinitionWithFormDataId(String formDataId, String applicationId, String formId, String version, String content) Verify for a given form data id: applicationId, formId, version number and content are verified- Parameters:
applicationId-formId-
-
verifyCategoryHasAllYFormDefinitions
-
verifyProductHasAllYFormDefinitions
-
getModelService
-