Class SearchQuestionTestHelper
- java.lang.Object
-
- com.funnelback.publicui.search.model.transaction.testutils.SearchQuestionTestHelper
-
public class SearchQuestionTestHelper extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classSearchQuestionTestHelper.MyServiceConfig
-
Constructor Summary
Constructors Constructor Description SearchQuestionTestHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidsetCurrentProfileConfig(Map<String,String> profileConfig, SearchQuestion question)Sets the map as the profile config options to use on the given search question.static voidsetProfileConfigSetting(SearchQuestion question, String key, String value)Sets a profile config setting on the search question.
-
-
-
Method Detail
-
setCurrentProfileConfig
public static void setCurrentProfileConfig(Map<String,String> profileConfig, SearchQuestion question)
Sets the map as the profile config options to use on the given search question. The map is not copied so further changes to the map will be reflected in the SearchQuestion. Example:SearchTransaction st = new SearchTransaction(); MapprofileOptions = new HashMap<>(); SearchQuestionProfileConfigurationHelper.setProfileConfigOptions(profileOptions, st.getQuestion()); profileOptions.put("foo", "bar"); // a will be set to "bar". String a = st.getQuestion().getCurrentProfileConfig().get("foo"); - Parameters:
profileConfig- the profile config options.question- the SearchQuestion which will have itsSearchQuestion.getCurrentProfileConfig()return a config which uses the given map.
-
setProfileConfigSetting
public static void setProfileConfigSetting(SearchQuestion question, String key, String value)
Sets a profile config setting on the search question.
-
-