Package de.hybris.platform.impex.jalo
Class ImpExTest
- java.lang.Object
-
- de.hybris.platform.testframework.HybrisJUnit4Test
-
- de.hybris.platform.impex.jalo.AbstractImpExTest
-
- de.hybris.platform.impex.jalo.ImpExTest
-
- All Implemented Interfaces:
JaloSessionHolder
@IntegrationTest public class ImpExTest extends AbstractImpExTest
This test cases check the script parsing and header validation of the impex extension.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<java.lang.String>nextLine-
Fields inherited from class de.hybris.platform.impex.jalo.AbstractImpExTest
english, german, utf8, windows1252
-
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession
-
-
Constructor Summary
Constructors Constructor Description ImpExTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckColumnDescriptor(StandardColumnDescriptor columnDescriptor, HeaderDescriptor header, java.lang.String qualifier, int position, AttributeDescriptor attributeDescriptor, boolean localized, boolean initial, boolean readonly, boolean partof, boolean mandatory, boolean unique, java.lang.String languageIso, java.util.Map modifiers)Checks if given column descriptor has all given attributes.protected java.lang.StringgetOtherRequiredAttributes(ComposedType composedType, java.util.List alreadyGot)Gets semicolon separated string with all attributes of given type not listed inalreadyGot.protected voidremoveQuietly(Item... items)voidtestAbstractInsertUpdate()Tests if inserts and updates of abstract types are handled correct.
See PLA-5106.voidtestBeanShell()Tests the usage of bean shell.voidtestBeanShellAfterEach()Tests theafterEachbean shell marker.voidtestBeanShellDiscardAndDumpLine()Tests the methodsdiscardLineanddumpLinefor bean shell usage.voidtestBeanShellExternalSyntaxParsing()Tests external syntax parsing.voidtestBeanShellIf()Tests the bean shellifcondition.voidtestBeanShellIncludeExternaData()Tests the including of external data in chained case.voidtestBeanShellIncludeExternaDataChained()Tests theincludeExternalDatastatement of bean shell.voidtestBeanShellInsertLine()Tests bean shell methodinsetLine.voidtestBeforeEach()Tests the methodsdiscardLineanddumpLinefor bean shell usage.voidtestBeforeEachMultiThread()voidtestCreateItem()Tests theImpExManager.createItem(String, String, String)method.voidtestDefinitions()Tests the usage of definitions.voidtestFixedLengthCSVReader()Tests theFixedLengthCSVReader.voidtestHeaderDetection()Checks if header lines are detected correct.voidtestHeaderErrors()Tests the header validation with different errors.voidtestHeaderParsing()Tests the correct parsing of headers using ImpExReader.voidtestIllegalAttributeType()Tests for correct errors if using illegal attribute types in header descriptor.voidtestIncludeCSVFromProperties()voidtestIncludeCSVFromPropertiesIgnoreMissingValues()voidtestLocalizedAttributePartialChange()Tests the partial update of localized attributes, means the update of only some localizations.voidtestParseColumnDescriptor()Tests theAbstractDescriptor.parseColumnDescriptor(String)method.voidtestReaderManager()Test theReaderManagerclass.voidtestReferenceByRelation()Tests usage of relation as reference type in header descriptor.voidtestSiblingAttributes()Tests different kinds of equal attribute name in header.voidtestSubtypeReferenceExpression()Tests the usage of subtype references in header descriptor.-
Methods inherited from class de.hybris.platform.impex.jalo.AbstractImpExTest
initJaloItems, setLegacyMode
-
Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
-
-
-
Method Detail
-
testSiblingAttributes
public void testSiblingAttributes()
Tests different kinds of equal attribute name in header.
-
getOtherRequiredAttributes
protected java.lang.String getOtherRequiredAttributes(ComposedType composedType, java.util.List alreadyGot)
Gets semicolon separated string with all attributes of given type not listed inalreadyGot.- Parameters:
composedType- type for which all attributes are neededalreadyGot- list of attributes which have to be excluded- Returns:
- semicolon separated string of attributes
-
testHeaderErrors
public void testHeaderErrors()
Tests the header validation with different errors.
-
testHeaderDetection
public void testHeaderDetection()
Checks if header lines are detected correct. See PLA-5115.
-
testHeaderParsing
public void testHeaderParsing()
Tests the correct parsing of headers using ImpExReader.
-
testAbstractInsertUpdate
public void testAbstractInsertUpdate()
Tests if inserts and updates of abstract types are handled correct.
See PLA-5106.
-
testSubtypeReferenceExpression
public void testSubtypeReferenceExpression()
Tests the usage of subtype references in header descriptor.
-
testBeanShellAfterEach
public void testBeanShellAfterEach()
Tests theafterEachbean shell marker.
-
testBeanShell
public void testBeanShell()
Tests the usage of bean shell.
-
testBeanShellIf
public void testBeanShellIf()
Tests the bean shellifcondition.
-
testBeanShellIncludeExternaDataChained
public void testBeanShellIncludeExternaDataChained()
Tests theincludeExternalDatastatement of bean shell.
-
testIncludeCSVFromProperties
public void testIncludeCSVFromProperties()
-
testIncludeCSVFromPropertiesIgnoreMissingValues
public void testIncludeCSVFromPropertiesIgnoreMissingValues() throws ConsistencyCheckException- Throws:
ConsistencyCheckException
-
testReaderManager
public void testReaderManager()
Test theReaderManagerclass.
-
testBeanShellIncludeExternaData
public void testBeanShellIncludeExternaData()
Tests the including of external data in chained case.
-
testLocalizedAttributePartialChange
public void testLocalizedAttributePartialChange()
Tests the partial update of localized attributes, means the update of only some localizations.
-
testFixedLengthCSVReader
public void testFixedLengthCSVReader()
Tests theFixedLengthCSVReader.
-
testBeanShellExternalSyntaxParsing
public void testBeanShellExternalSyntaxParsing()
Tests external syntax parsing.
-
testDefinitions
public void testDefinitions()
Tests the usage of definitions.
-
testIllegalAttributeType
public void testIllegalAttributeType()
Tests for correct errors if using illegal attribute types in header descriptor.
-
checkColumnDescriptor
protected void checkColumnDescriptor(StandardColumnDescriptor columnDescriptor, HeaderDescriptor header, java.lang.String qualifier, int position, AttributeDescriptor attributeDescriptor, boolean localized, boolean initial, boolean readonly, boolean partof, boolean mandatory, boolean unique, java.lang.String languageIso, java.util.Map modifiers)
Checks if given column descriptor has all given attributes.- Parameters:
columnDescriptor- column descriptor which will be checkedheader- expected headerqualifier- expected qualifierposition- expected positionattributeDescriptor- expected attribute descriptorlocalized- expected localized flaginitial- expected initial flagreadonly- expected readonly flagpartof- expected partof flagmandatory- expected mandatory flagunique- expected unique flaglanguageIso- expected languageIsomodifiers- expected modifiers
-
testReferenceByRelation
public void testReferenceByRelation()
Tests usage of relation as reference type in header descriptor.
-
removeQuietly
protected void removeQuietly(Item... items)
-
testBeanShellInsertLine
public void testBeanShellInsertLine()
Tests bean shell methodinsetLine.
-
testBeanShellDiscardAndDumpLine
public void testBeanShellDiscardAndDumpLine()
Tests the methodsdiscardLineanddumpLinefor bean shell usage.
-
testBeforeEach
public void testBeforeEach() throws java.io.IOExceptionTests the methodsdiscardLineanddumpLinefor bean shell usage.- Throws:
java.io.IOException
-
testBeforeEachMultiThread
public void testBeforeEachMultiThread() throws java.io.IOException- Throws:
java.io.IOException
-
testCreateItem
public void testCreateItem()
Tests theImpExManager.createItem(String, String, String)method. See PLA-8.
-
testParseColumnDescriptor
public void testParseColumnDescriptor()
Tests theAbstractDescriptor.parseColumnDescriptor(String)method.
-
-