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
public class SearchInFieldTest extends AbstractIntegrationTest
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_VERSION
-
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 SearchInFieldTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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 resultvoid
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 hwcatalogvoid
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 hwcatalogvoid
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'void
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'-
Methods inherited from class de.hybris.platform.solrfacetsearch.integration.AbstractIntegrationTest
beforeLoadData, getFacetSearchConfig, getFacetSearchConfigName, getIndexedTypeModel, getProductCode, getSolrFacetSearchConfigModel, getTestId, importConfig, importConfig, initializeIndexedType, loadData, readFile, setUp, tearDown
-
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
-
testSearchInFieldForCode
public void testSearchInFieldForCode() throws java.lang.Exception
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:
java.lang.Exception
-
testSearchInFieldForName
public void testSearchInFieldForName() throws java.lang.Exception
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:
java.lang.Exception
-
testSearchForNameInAnotherLanguage
public void testSearchForNameInAnotherLanguage() throws java.lang.Exception
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:
java.lang.Exception
-
testSearchInFieldWithOrConjunction
public void testSearchInFieldWithOrConjunction() throws java.lang.Exception
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:
java.lang.Exception
-
testSearchInFieldWithAndConjunction
public void testSearchInFieldWithAndConjunction() throws java.lang.Exception
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:
java.lang.Exception
-
-