Class FlexibleSearchServiceTest
- java.lang.Object
-
- de.hybris.platform.testframework.HybrisJUnit4Test
-
- de.hybris.platform.servicelayer.ServicelayerBaseTest
-
- de.hybris.platform.servicelayer.ServicelayerTest
-
- de.hybris.platform.servicelayer.ServicelayerTransactionalTest
-
- de.hybris.platform.servicelayer.search.FlexibleSearchServiceTest
-
- All Implemented Interfaces:
JaloSessionHolder
@IntegrationTest public class FlexibleSearchServiceTest extends ServicelayerTransactionalTest
-
-
Field Summary
-
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 FlexibleSearchServiceTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidrandomizeStatuses(ArticleApprovalStatus... statuses)randomize the approval statuses for productsvoidsetUp()voidshouldAddJdbcHintToTheQuery()voidshouldFindLanguageByItsLocalizedNames()voidshouldFireQueryWithHanaHints()voidshouldRespectSearchRestrictionsInTranslateMethod()voidshouldThrowFlexibleSearchExceptionFromSlayerPackageWhenTranslationWillThrowJaloException()voidtestComplexSearch()voidtestComplexSearch2()voidtestFailOnUnknownFields()voidtestFindByApprovalStatus()voidtestMultiColumnSearch()voidtestPLA8496()This method tests the usage of jalo classes vs.voidtestPLA8827_hybris_enum()If explicitly declared expected class as implementation ofHybrisEnumValueinstances of this type should be returned.voidtestPLA8827_items()Generally if no result class provided search result should contain elements extending ItemModel In result for this test might not only Items but also enumeration values be returned, anyway it should not throw an exception and return all object asItemModel,EnumerationValueModelinstances.voidtestPLA8827_multiple()This method tests the search for enumeration values but with different result classes for a multiple column list.voidtestPLA8827_single()This method tests the search for enumeration values but with different result classes for a single column list.voidtestPLA9192_ResultIsNullSearch()voidtestSearchRangeCombos()This test checks the differtent params for the searchranges for the servicelayer search against the jalo search.voidtestSearchResultInfos()voidtestSearchTypeInstancesWithoutParams()voidtestSearchUnique()voidtestSearchUniqueFailsAmbiguousIdentifier()voidtestSearchUniqueFailsModelNotFound()voidtestSearchWithSingleParams()voidtestSearchWithSingleParamsForLanguage()voidtestTranslate()voidtestTranslateWithCustomSession()PLA-10781 test checks if the during flexibleSearchService.translate all needed attributes has been set up to local context-
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
-
-
-
-
Method Detail
-
setUp
public void setUp() throws java.lang.Exception- Throws:
java.lang.Exception
-
testSearchTypeInstancesWithoutParams
public void testSearchTypeInstancesWithoutParams()
-
testSearchWithSingleParamsForLanguage
public void testSearchWithSingleParamsForLanguage() throws ConsistencyCheckException- Throws:
ConsistencyCheckException
-
testSearchWithSingleParams
public void testSearchWithSingleParams()
-
testComplexSearch
public void testComplexSearch()
-
testComplexSearch2
public void testComplexSearch2()
-
testFailOnUnknownFields
public void testFailOnUnknownFields()
-
testSearchResultInfos
public void testSearchResultInfos()
-
testSearchRangeCombos
public void testSearchRangeCombos()
This test checks the differtent params for the searchranges for the servicelayer search against the jalo search. There are (currently) 36 products in the db. The testcases should cover all possibilities: search with/without unlimited range, get a resultcount which fits/fits not in the overal result count (different starting points by a fixed result count).
-
testMultiColumnSearch
public void testMultiColumnSearch()
-
testPLA8496
public void testPLA8496()
This method tests the usage of jalo classes vs. service layer model classes (and default java classes) for the search result class list. The same flexiblesearch statement is used for both searches and multicolumn.
-
testPLA8827_single
public void testPLA8827_single()
This method tests the search for enumeration values but with different result classes for a single column list.
-
testPLA8827_items
public void testPLA8827_items()
Generally if no result class provided search result should contain elements extending ItemModel In result for this test might not only Items but also enumeration values be returned, anyway it should not throw an exception and return all object asItemModel,EnumerationValueModelinstances.
-
testPLA8827_hybris_enum
public void testPLA8827_hybris_enum()
If explicitly declared expected class as implementation ofHybrisEnumValueinstances of this type should be returned.
-
testPLA8827_multiple
public void testPLA8827_multiple()
This method tests the search for enumeration values but with different result classes for a multiple column list.
-
randomizeStatuses
protected void randomizeStatuses(ArticleApprovalStatus... statuses)
randomize the approval statuses for products
-
testPLA9192_ResultIsNullSearch
public void testPLA9192_ResultIsNullSearch()
-
testTranslate
public void testTranslate()
-
shouldThrowFlexibleSearchExceptionFromSlayerPackageWhenTranslationWillThrowJaloException
public void shouldThrowFlexibleSearchExceptionFromSlayerPackageWhenTranslationWillThrowJaloException()
-
testTranslateWithCustomSession
public void testTranslateWithCustomSession()
PLA-10781 test checks if the during flexibleSearchService.translate all needed attributes has been set up to local context
-
testSearchUnique
public void testSearchUnique()
-
testSearchUniqueFailsModelNotFound
public void testSearchUniqueFailsModelNotFound()
-
testSearchUniqueFailsAmbiguousIdentifier
public void testSearchUniqueFailsAmbiguousIdentifier()
-
testFindByApprovalStatus
public void testFindByApprovalStatus()
-
shouldFindLanguageByItsLocalizedNames
public void shouldFindLanguageByItsLocalizedNames()
-
shouldRespectSearchRestrictionsInTranslateMethod
public void shouldRespectSearchRestrictionsInTranslateMethod() throws java.lang.Exception- Throws:
java.lang.Exception
-
shouldAddJdbcHintToTheQuery
public void shouldAddJdbcHintToTheQuery()
-
shouldFireQueryWithHanaHints
public void shouldFireQueryWithHanaHints()
-
-