Class SearchInFieldTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.ServicelayerTest
de.hybris.platform.solrfacetsearch.integration.AbstractIntegrationTest
de.hybris.platform.solrfacetsearch.integration.SearchInFieldTest
- All Implemented Interfaces:
JaloSessionHolder
Test class concentrates on searching for particular indexed properties alone, or joined together with OR and AND
conjunctions
-
Field Summary
Fields inherited from class de.hybris.platform.solrfacetsearch.integration.AbstractIntegrationTest
DEFAULT_ENCODING, expectedException, FACET_SEARCH_CONFIG_NAME, HW_CATALOG, ONLINE_CATALOG_VERSION, PRODUCT_CODE, SOLR_SERVER_CLOUD_ENDPOINT, SOLR_SERVER_MODE, SOLR_SERVER_STANDALONE_ENDPOINT, STAGED_CATALOG_VERSIONFields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importServiceFields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidGiven products with name = 'Sony DSC-P200 CYBER-SHOT silber_online_en' for language en in hwcatalog and no products with name 'Sony DSC-P200 CYBER-SHOT silber_online_en' for language fr in hwcatalog and with hwcatalog selected and with lanugage fr selected then a searchInField query should yield an empty resultvoidGiven a product with code = HW2300-2356 in hwcatalog and with hwcatalog selected then a searchInField query must yield a result of size 1 containing the producht with HW2300-2356 for catalog hwcatalogvoidGiven products with name = 'Sony DSC-P200 CYBER-SHOT silber_online_en' for language en in hwcatalog and with hwcatalog selected and with lanugage en selected then a searchInField query must yield a result only containing products with the given name for langauge en and catalog hwcatalogvoidGiven products with manufacturerName = 'XFX' in hwcatalog and the products with name like 'GeForce*online_en' for language en in hwcatalog and with hwcatalog selected and with language en selected then a searchInField for manufacturerName = 'XFX' AND name = 'GeForce' should yield a result with products with manufacturerName = 'XFX' AND name containing 'GeForce'voidGiven product 'HW1240-1732' with manufacturerName = 'Hewlett-Packard' in hwcatalog and another product 'HW1100-0024' with manufacturerName = 'EIZO' in hwcatalog and with hwcatalog selected then a searchInField for manufacturerName = 'Hewlett-Packard' OR manufacturerName = 'EIZO' should yield those two products and all products with manufacturerName = 'Hewlett-Packard' or 'EIZO'Methods inherited from class de.hybris.platform.solrfacetsearch.integration.AbstractIntegrationTest
beforeLoadData, getFacetSearchConfig, getFacetSearchConfigName, getIndexedTypeModel, getProductCode, getSolrFacetSearchConfigModel, getSolrSearchProviderFactory, getTestId, importConfig, importConfig, initializeIndexedType, loadData, readFile, setUp, tearDownMethods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNoneMethods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSessionMethods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
Constructor Details
-
SearchInFieldTest
public SearchInFieldTest()
-
-
Method Details
-
testSearchInFieldForCode
Given a product with code = HW2300-2356 in hwcatalog and with hwcatalog selected then a searchInField query must yield a result of size 1 containing the producht with HW2300-2356 for catalog hwcatalog- Throws:
Exception
-
testSearchInFieldForName
Given products with name = 'Sony DSC-P200 CYBER-SHOT silber_online_en' for language en in hwcatalog and with hwcatalog selected and with lanugage en selected then a searchInField query must yield a result only containing products with the given name for langauge en and catalog hwcatalog- Throws:
Exception
-
testSearchForNameInAnotherLanguage
Given products with name = 'Sony DSC-P200 CYBER-SHOT silber_online_en' for language en in hwcatalog and no products with name 'Sony DSC-P200 CYBER-SHOT silber_online_en' for language fr in hwcatalog and with hwcatalog selected and with lanugage fr selected then a searchInField query should yield an empty result- Throws:
Exception
-
testSearchInFieldWithOrConjunction
Given product 'HW1240-1732' with manufacturerName = 'Hewlett-Packard' in hwcatalog and another product 'HW1100-0024' with manufacturerName = 'EIZO' in hwcatalog and with hwcatalog selected then a searchInField for manufacturerName = 'Hewlett-Packard' OR manufacturerName = 'EIZO' should yield those two products and all products with manufacturerName = 'Hewlett-Packard' or 'EIZO'- Throws:
Exception
-
testSearchInFieldWithAndConjunction
Given products with manufacturerName = 'XFX' in hwcatalog and the products with name like 'GeForce*online_en' for language en in hwcatalog and with hwcatalog selected and with language en selected then a searchInField for manufacturerName = 'XFX' AND name = 'GeForce' should yield a result with products with manufacturerName = 'XFX' AND name containing 'GeForce'- Throws:
Exception
-