modify test cases.
This commit is contained in:
parent
5d76801985
commit
681811e9b4
3 changed files with 8 additions and 3 deletions
|
@ -40,7 +40,7 @@ import jp.sf.fess.entity.SearchQuery.SortField;
|
|||
import jp.sf.fess.helper.BrowserTypeHelper;
|
||||
import jp.sf.fess.helper.QueryHelper;
|
||||
import jp.sf.fess.helper.RoleQueryHelper;
|
||||
import jp.sf.fess.util.ComponentUtil;
|
||||
import jp.sf.fess.helper.SystemHelper;
|
||||
import jp.sf.fess.util.QueryUtil;
|
||||
import jp.sf.fess.util.SearchParamMap;
|
||||
|
||||
|
@ -85,6 +85,9 @@ public class QueryHelperImpl implements QueryHelper, Serializable {
|
|||
@Resource
|
||||
protected RoleQueryHelper roleQueryHelper;
|
||||
|
||||
@Resource
|
||||
protected SystemHelper systemHelper;
|
||||
|
||||
protected Set<String> apiResponseFieldSet;
|
||||
|
||||
protected String[] responseFields = new String[] { "id", "docId", "score",
|
||||
|
@ -910,7 +913,7 @@ public class QueryHelperImpl implements QueryHelper, Serializable {
|
|||
}
|
||||
|
||||
protected String getQueryLanguage() {
|
||||
final String[] supportedLanguages = ComponentUtil.getSystemHelper()
|
||||
final String[] supportedLanguages = systemHelper
|
||||
.getSupportedLanguages();
|
||||
if (supportedLanguages.length == 0) {
|
||||
return null;
|
||||
|
|
|
@ -1809,7 +1809,7 @@ public class QueryHelperImplTest extends S2TestCase {
|
|||
assertEquals("zh", queryHelperImpl.getQueryLanguage());
|
||||
request.setLocale(Locale.CANADA_FRENCH);
|
||||
assertEquals("fr", queryHelperImpl.getQueryLanguage());
|
||||
request.setLocale(Locale.ENGLISH);
|
||||
request.setLocale(new Locale("aa"));
|
||||
assertNull(queryHelperImpl.getQueryLanguage());
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN"
|
||||
"http://www.seasar.org/dtd/components24.dtd">
|
||||
<components>
|
||||
<component name="systemHelper" class="jp.sf.fess.helper.SystemHelper">
|
||||
</component>
|
||||
<component name="queryHelper" class="jp.sf.fess.helper.impl.QueryHelperImpl">
|
||||
</component>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue