Class ItemModelTest
- java.lang.Object
-
- de.hybris.platform.testframework.HybrisJUnit4Test
-
- de.hybris.platform.servicelayer.ServicelayerBaseTest
-
- de.hybris.platform.servicelayer.ServicelayerTest
-
- de.hybris.platform.servicelayer.model.ItemModelTest
-
- All Implemented Interfaces:
JaloSessionHolder
- Direct Known Subclasses:
ItemModelFetchNoneTest
public abstract class ItemModelTest extends ServicelayerTest
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
beforeCfg
protected CommonI18NService
commonI18NService
protected ConverterRegistry
converterRegistry
protected Product
defaultProduct
protected FlexibleSearchService
flexibleSearchService
protected I18NService
i18nService
protected TestImportCsvUtil
importCsvUtil
protected ModelService
modelService
protected java.lang.String
persistenceModeBefore
protected boolean
persistenceModeSaved
protected SelfHealingService
selfHealingService
protected SourceTransformer
sourceTransformer
-
Fields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importService
-
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession
-
-
Constructor Summary
Constructors Constructor Description ItemModelTest()
-
Method Summary
-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNone
-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSession
-
Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
-
-
-
Field Detail
-
modelService
protected ModelService modelService
-
i18nService
protected I18NService i18nService
-
commonI18NService
protected CommonI18NService commonI18NService
-
flexibleSearchService
protected FlexibleSearchService flexibleSearchService
-
importCsvUtil
protected TestImportCsvUtil importCsvUtil
-
converterRegistry
protected ConverterRegistry converterRegistry
-
sourceTransformer
protected SourceTransformer sourceTransformer
-
selfHealingService
protected SelfHealingService selfHealingService
-
defaultProduct
protected Product defaultProduct
-
beforeCfg
protected java.lang.String beforeCfg
-
persistenceModeBefore
protected java.lang.String persistenceModeBefore
-
persistenceModeSaved
protected boolean persistenceModeSaved
-
-
Method Detail
-
setUp
public void setUp() throws java.lang.Exception
- Throws:
java.lang.Exception
-
tearDown
public void tearDown()
-
enableDirectMode
protected void enableDirectMode()
-
forceLegacyMode
protected void forceLegacyMode()
-
getPrefetchMode
protected abstract java.lang.String getPrefetchMode()
-
getModelConvertersToReload
protected abstract java.util.Map<java.lang.String,java.lang.Class<? extends ItemModel>> getModelConvertersToReload()
-
testSerializableStrategies
public void testSerializableStrategies() throws java.io.IOException, java.lang.ClassNotFoundException, JaloSecurityException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
JaloSecurityException
-
testNotSerializableWhenNewChangedOrRemoved
public void testNotSerializableWhenNewChangedOrRemoved() throws java.io.IOException, java.lang.ClassNotFoundException, JaloSecurityException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
JaloSecurityException
-
testLoadingNormalAttributeUsingDirectPersistence
public abstract void testLoadingNormalAttributeUsingDirectPersistence()
-
testLoadingNormalAttributeUsingOldPersistence
public abstract void testLoadingNormalAttributeUsingOldPersistence()
-
testLoadingReferenceAttribute
public void testLoadingReferenceAttribute()
-
testChangingUnloadedReference
public void testChangingUnloadedReference()
-
testReloadOfJaloChangedAttribute
public void testReloadOfJaloChangedAttribute() throws ConsistencyCheckException
- Throws:
ConsistencyCheckException
-
testSetLocalizedAttributeToNull
public void testSetLocalizedAttributeToNull() throws ConsistencyCheckException
- Throws:
ConsistencyCheckException
-
testLoadingPrimitiveAttributeUsingDirectPersistence
public abstract void testLoadingPrimitiveAttributeUsingDirectPersistence()
-
testLoadingPrimitiveAttributeUsingOldPersistence
public abstract void testLoadingPrimitiveAttributeUsingOldPersistence()
-
testLoadingOnlyInitialAttribute
public void testLoadingOnlyInitialAttribute() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testLocalizedLoading
public void testLocalizedLoading()
-
testLoadingSettingComposedAttribute
public void testLoadingSettingComposedAttribute()
-
testCreateByModelClass
public void testCreateByModelClass()
-
testCreateByTypeCode
public void testCreateByTypeCode()
-
getLoadedValue
protected <T> T getLoadedValue(AbstractItemModel model, java.lang.String attribute)
-
testLoadByPK
public void testLoadByPK()
-
testTypeWithoutModel
public void testTypeWithoutModel() throws JaloInvalidParameterException, JaloDuplicateCodeException
-
testCreateAttachLocalization
public void testCreateAttachLocalization()
-
testDetachedLocalization
public void testDetachedLocalization()
-
testUpToDate
public void testUpToDate()
-
testDetachViaSource
public void testDetachViaSource()
-
testModifieableCollections
public void testModifieableCollections()
-
testLanguageFallback2
public void testLanguageFallback2() throws ConsistencyCheckException
- Throws:
ConsistencyCheckException
-
testLanguageFallback
public void testLanguageFallback()
-
testLoadingError
public void testLoadingError()
-
testLoadingWithoutLanguage
public void testLoadingWithoutLanguage() throws ConsistencyCheckException
- Throws:
ConsistencyCheckException
-
testUnsupportedMandatoryAttributesCheck
public void testUnsupportedMandatoryAttributesCheck() throws JaloInvalidParameterException, JaloDuplicateCodeException, JaloItemNotFoundException, JaloGenericCreationException, JaloAbstractTypeException, JaloDuplicateQualifierException
-
testSaveMapAttribute
public void testSaveMapAttribute()
-
testEnumLocalization
public void testEnumLocalization()
-
testHashMapVersusArrays
public void testHashMapVersusArrays()
-
testLazyLoadingConfiguration
public void testLazyLoadingConfiguration() throws JaloInvalidParameterException, JaloDuplicateCodeException
See PLA-8878.
-
testReloadNoPrefetch
public void testReloadNoPrefetch() throws ConsistencyCheckException
- Throws:
ConsistencyCheckException
-
testContextStateChange
public void testContextStateChange()
PLA-9413
-
testRelationSetterWithNull
public void testRelationSetterWithNull()
PLA-10327
-
testRelationSetterWithEmptyColl
public void testRelationSetterWithEmptyColl()
PLA-10327
-
testLocalizedSetterWithoutSessionLang
public void testLocalizedSetterWithoutSessionLang()
-
testLocalizedSetterWithSessionLang
public void testLocalizedSetterWithSessionLang()
-
testSetLocalizedAttributesForSubTypeInModelHierarchy
public void testSetLocalizedAttributesForSubTypeInModelHierarchy()
Example of test fetching localized attribute from super parent type "TypeManagerManaged" , where in type hierarchy comes another type "Type" which adds additional localized values. This is special case when the protected _localizedValues could be overriden and localized attribute might get lost.
-
testSaveAfterAttachedTwice
public void testSaveAfterAttachedTwice()
-
testGeneratePKForNewModel
public void testGeneratePKForNewModel()
-
-