Class 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
  • Constructor Details

    • SearchInFieldTest

      public SearchInFieldTest()
  • Method Details

    • testSearchInFieldForCode

      public void testSearchInFieldForCode() throws 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:
      Exception
    • testSearchInFieldForName

      public void testSearchInFieldForName() throws 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:
      Exception
    • testSearchForNameInAnotherLanguage

      public void testSearchForNameInAnotherLanguage() throws 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:
      Exception
    • testSearchInFieldWithOrConjunction

      public void testSearchInFieldWithOrConjunction() throws 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:
      Exception
    • testSearchInFieldWithAndConjunction

      public void testSearchInFieldWithAndConjunction() throws 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:
      Exception