Commits

Anonymous committed 8eb4eeb

improved unit test

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@978e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits ededaee

Comments (0)

Files changed (1)

src/test/com/opensymphony/xwork/interceptor/PrepareInterceptorTest.java

 import com.opensymphony.xwork.mock.MockActionInvocation;
 import com.opensymphony.xwork.Preparable;
 import com.opensymphony.xwork.Action;
+import com.opensymphony.xwork.SimpleFooAction;
 import junit.framework.TestCase;
 
 /**
         interceptor.after(mai, Action.SUCCESS); // to have higher code coverage
     }
 
+    public void testNoPrepareCalled() throws Exception {
+        MockActionInvocation mai = new MockActionInvocation();
+        mai.setAction(new SimpleFooAction());
+
+        interceptor.before(mai);
+        interceptor.after(mai, Action.SUCCESS); // to have higher code coverage
+    }
+
     protected void setUp() throws Exception {
         mock = new Mock(Preparable.class);
         interceptor = new PrepareInterceptor();