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 :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]