Class TriggerServiceDemoTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.cronjob.TriggerServiceDemoTest
- All Implemented Interfaces:
JaloSessionHolder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final longprotected static final longprotected static final longFields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanUp()protected ComposedTypeCreate a new Jalo type and register it with the type system.protected booleansetTypeAttributeWritable(String typeCode, Class<? extends AbstractItemModel> modelClass, String attributeQualifier, boolean writable) Set the writable status of a type attribute.voidsetUp()voidvoidvoidMapping of cron job to cron job model may not be possible when some attributes of the cron job model are not writable.Methods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getApplicationContext, getBeanName, prepareApplicationContextAndSessionMethods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
Field Details
-
SECOND
protected static final long SECOND- See Also:
-
MINUTE
protected static final long MINUTE- See Also:
-
HOUR
protected static final long HOUR- See Also:
-
-
Constructor Details
-
TriggerServiceDemoTest
public TriggerServiceDemoTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
cleanUp
public void cleanUp() -
createType
protected ComposedType createType(Class<? extends Item> parentJaloClass, String typeCode, Class<? extends Item> jaloClass) throws JaloTypeException Create a new Jalo type and register it with the type system. If a type with the same type code and Jalo class already exists, it is returned instead.- Parameters:
parentJaloClass- The Jalo class of the parent type.typeCode- Type code of the new type. Must be unique.jaloClass- The Jalo class of the new type.- Returns:
- The new type instance.
- Throws:
JaloTypeException- Thrown if the code is not unique in the type system.IllegalStateException- If a type with the same type code and a different Jalo class already exists in the type system.
-
setTypeAttributeWritable
protected boolean setTypeAttributeWritable(String typeCode, Class<? extends AbstractItemModel> modelClass, String attributeQualifier, boolean writable) Set the writable status of a type attribute.- Parameters:
typeCode- The type code.modelClass- Model class for the type.attributeQualifier- Qualifier to identify the attribute.writable- New writable status.- Returns:
- Original writable status of the given attribute.
-
testJobCreationWithNonWritableJobAttribute
public void testJobCreationWithNonWritableJobAttribute() throws JaloTypeException, ConsistencyCheckExceptionMapping of cron job to cron job model may not be possible when some attributes of the cron job model are not writable. This test validates that the corresponding exception is caught (and logged) and does not cause failure of the cron job creation and execution. -
testActivationWithCronExpression
public void testActivationWithCronExpression() -
testActivationOldWay
public void testActivationOldWay()
-