Class PersistenceTestUtils
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.model.impl.PersistenceTestUtils
-
public class PersistenceTestUtils extends java.lang.ObjectUtility class for tests. Allows to verify if the tested model is fully SLD compatible.
-
-
Constructor Summary
Constructors Constructor Description PersistenceTestUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.DateadjustToDB(java.util.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 voidverifyThatUnderlyingPersistenceObjectIsSld(ItemModel item)Asserts if a given item is backed by persistence object of SLD type.
-
-
-
Method Detail
-
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
public static void verifyThatUnderlyingPersistenceObjectIsSld(ItemModel item)
Asserts if a given item is backed by persistence object of SLD type.- Parameters:
item- item to verify
-
adjustToDB
public static java.util.Date adjustToDB(java.util.Date date)
Simulates the effect of database storing a particular date.On MySQL this means dropping all milliseconds!
-
-