Class PersistenceTestUtils
java.lang.Object
de.hybris.platform.servicelayer.internal.model.impl.PersistenceTestUtils
Utility class for tests. Allows to verify if the tested model is fully SLD compatible.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DateadjustToDB(Date date) Simulates the effect of database storing a particular date.static <T extends AbstractItemModel>
voidsaveAndVerifyThatPersistedThroughSld(ModelService modelService, T item) Saves and asserts that a given item is saved through SLD instead of Jalo.static voidAsserts if a given item is backed by persistence object of SLD type.
-
Constructor Details
-
PersistenceTestUtils
public PersistenceTestUtils()
-
-
Method Details
-
saveAndVerifyThatPersistedThroughSld
public static <T extends AbstractItemModel> void saveAndVerifyThatPersistedThroughSld(ModelService modelService, T item) Saves and asserts that a given item is saved through SLD instead of Jalo.- Parameters:
modelService- model service for item savingitem- item to save
-
verifyThatUnderlyingPersistenceObjectIsSld
Asserts if a given item is backed by persistence object of SLD type.- Parameters:
item- item to verify
-
adjustToDB
Simulates the effect of database storing a particular date.On MySQL this means dropping all milliseconds!
-