jdyer1 commented on code in PR #778:
URL: https://github.com/apache/struts/pull/778#discussion_r1422533854


##########
core/src/test/java/org/apache/struts2/views/jsp/BeanTagTest.java:
##########
@@ -51,8 +51,8 @@ public void testSimple() {
             fail();
         }
 
-        request.verify();
-        pageContext.verify();

Review Comment:
   @yasserzamani Thank you for your review.  I can say for sure that 
"pageContext.verify()" is a no-op.  As for the request, my belief is the mock 
is designed to let the tester set up a series of expectations, then call 
"verify" when the test is ready to check them.  However, this test seems to set 
no expectations, so my belief is the "verify" method here also would do nothing.
   
   You touch here on what I consider to be the most risky of these changes:  
The "mockobjects" library for the servlet api could no longer be used so I 
replaced them with the Spring library's mocks.  However, the Spring mocks do 
not support this "set/verify" pattern so in the few places our code uses it, I 
had to make a judgement as to what I thought the original intent was.  I cannot 
say for sure I got this right 100% of the time!



-- 
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]

Reply via email to