Commits

Anonymous committed c59214b

corrected test to use assertEquals(expected, actual) instead of assertEquals(actual, expected)

git-svn-id: http://svn.opensymphony.com/svn/xwork/branches/xwork_1-2@1698e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/test/com/opensymphony/xwork/validator/ActionValidatorManagerTest.java

         assertFalse(action.hasActionMessages());
         assertTrue(action.hasFieldErrors());
         assertTrue(action.getFieldErrors().containsKey("referenceNumber"));
-        assertEquals(((List)action.getFieldErrors().get("referenceNumber")).size(), 1);
+        assertEquals(1, ((List)action.getFieldErrors().get("referenceNumber")).size());
         assertTrue(action.getFieldErrors().containsKey("order"));
-        assertEquals(((List)action.getFieldErrors().get("order")).size(), 1);
+        assertEquals(1, ((List)action.getFieldErrors().get("order")).size());
         assertTrue(action.getFieldErrors().containsKey("customer.name"));
-        assertEquals(((List)action.getFieldErrors().get("customer.name")).size(), 1);
+        assertEquals(1, ((List)action.getFieldErrors().get("customer.name")).size());
         assertTrue(action.getFieldErrors().containsKey("customer.age"));
-        assertEquals(((List)action.getFieldErrors().get("customer.age")).size(), 1);
+        assertEquals(1, ((List)action.getFieldErrors().get("customer.age")).size());
         assertTrue(action.getFieldErrors().containsKey("customer.address.street"));
-        assertEquals(((List)action.getFieldErrors().get("customer.address.street")).size(), 1);
+        assertEquals(1, ((List)action.getFieldErrors().get("customer.address.street")).size());
         assertTrue(action.getFieldErrors().containsKey("customer.address.pobox"));
-        //assertEquals(((List)action.getFieldErrors().get("customer.address.pobox")).size(), 2);
+        assertEquals(2, ((List)action.getFieldErrors().get("customer.address.pobox")).size());
 
         for (Iterator i = action.getFieldErrors().keySet().iterator(); i.hasNext(); ) {
             System.out.println(i.next());   
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.