[
https://issues.apache.org/jira/browse/WW-5336?focusedWorklogId=877401&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-877401
]
ASF GitHub Bot logged work on WW-5336:
--------------------------------------
Author: ASF GitHub Bot
Created on: 22/Aug/23 06:39
Start Date: 22/Aug/23 06:39
Worklog Time Spent: 10m
Work Description: kusalk commented on code in PR #735:
URL: https://github.com/apache/struts/pull/735#discussion_r1301076946
##########
core/src/test/java/org/apache/struts2/util/StrutsUtilTest.java:
##########
@@ -145,28 +147,51 @@ public void testGetContextMethod() {
}
- public void testMakeSelectListMethod() {
- String[] selectedList = new String[] { "Car", "Airplane", "Bus" };
- List list = new ArrayList();
- list.add("Lorry");
- list.add("Car");
- list.add("Helicopter");
+ public void testMakeSelectList() {
+ String[] selectedList = new String[]{"Car", "Airplane", "Bus"};
+ List<String> list = Arrays.asList("Lorry", "Car", "Helicopter");
+
+ stack.getContext().put("mySelectedList", selectedList);
+ stack.getContext().put("myList", list);
+
+ List<ListEntry> listMade =
strutsUtil.makeSelectList("#mySelectedList", "#myList", null, null);
+
+ assertEquals(listMade.size(), 3);
Review Comment:
Seems all the assertions in this class are mis-ordered, I've amended the
ones I've touched :)
Issue Time Tracking
-------------------
Worklog Id: (was: 877401)
Time Spent: 1h 40m (was: 1.5h)
> Merge OgnlTool class into StrutsUtil class
> ------------------------------------------
>
> Key: WW-5336
> URL: https://issues.apache.org/jira/browse/WW-5336
> Project: Struts 2
> Issue Type: Improvement
> Components: Core
> Reporter: Kusal Kithul-Godage
> Priority: Minor
> Fix For: 6.3.0
>
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> I can't see any benefit in having OgnlTool as a separate class/bean.
> Will deprecate to ensure backwards compatibility maintained.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)