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 Detail

      • SearchInFieldTest

        public SearchInFieldTest()
    • 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