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 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.protected java.lang.String
getOtherRequiredAttributes(ComposedType composedType, java.util.List alreadyGot)
Gets semicolon separated string with all attributes of given type not listed inalreadyGot
.protected void
removeQuietly(Item... items)
void
testAbstractInsertUpdate()
Tests if inserts and updates of abstract types are handled correct.
See PLA-5106.void
testBeanShell()
Tests the usage of bean shell.void
testBeanShellAfterEach()
Tests theafterEach
bean shell marker.void
testBeanShellDiscardAndDumpLine()
Tests the methodsdiscardLine
anddumpLine
for bean shell usage.void
testBeanShellExternalSyntaxParsing()
Tests external syntax parsing.void
testBeanShellIf()
Tests the bean shellif
condition.void
testBeanShellIncludeExternaData()
Tests the including of external data in chained case.void
testBeanShellIncludeExternaDataChained()
Tests theincludeExternalData
statement of bean shell.void
testBeanShellInsertLine()
Tests bean shell methodinsetLine
.void
testBeforeEach()
Tests the methodsdiscardLine
anddumpLine
for bean shell usage.void
testBeforeEachMultiThread()
void
testCreateItem()
Tests theImpExManager.createItem(String, String, String)
method.void
testDefinitions()
Tests the usage of definitions.void
testFixedLengthCSVReader()
Tests theFixedLengthCSVReader
.void
testHeaderDetection()
Checks if header lines are detected correct.void
testHeaderErrors()
Tests the header validation with different errors.void
testHeaderParsing()
Tests the correct parsing of headers using ImpExReader.void
testIllegalAttributeType()
Tests for correct errors if using illegal attribute types in header descriptor.void
testIncludeCSVFromProperties()
void
testIncludeCSVFromPropertiesIgnoreMissingValues()
void
testLocalizedAttributePartialChange()
Tests the partial update of localized attributes, means the update of only some localizations.void
testParseColumnDescriptor()
Tests theAbstractDescriptor.parseColumnDescriptor(String)
method.void
testReaderManager()
Test theReaderManager
class.void
testReferenceByRelation()
Tests usage of relation as reference type in header descriptor.void
testSiblingAttributes()
Tests different kinds of equal attribute name in header.void
testSubtypeReferenceExpression()
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 theafterEach
bean shell marker.
-
testBeanShell
public void testBeanShell()
Tests the usage of bean shell.
-
testBeanShellIf
public void testBeanShellIf()
Tests the bean shellif
condition.
-
testBeanShellIncludeExternaDataChained
public void testBeanShellIncludeExternaDataChained()
Tests theincludeExternalData
statement of bean shell.
-
testIncludeCSVFromProperties
public void testIncludeCSVFromProperties()
-
testIncludeCSVFromPropertiesIgnoreMissingValues
public void testIncludeCSVFromPropertiesIgnoreMissingValues() throws ConsistencyCheckException
- Throws:
ConsistencyCheckException
-
testReaderManager
public void testReaderManager()
Test theReaderManager
class.
-
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 methodsdiscardLine
anddumpLine
for bean shell usage.
-
testBeforeEach
public void testBeforeEach() throws java.io.IOException
Tests the methodsdiscardLine
anddumpLine
for 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.
-
-