Skip navigation.

Unit test Struts applications with mock objects and AOP

Unit test Struts applications with mock objects and AOP

Integrating two popular test frameworks, StrutsTestCase and EasyMock, to unit-test Struts applications leads to easier test setups and faster test runs. However, these two frameworks leave a gap that prevents an ideal integration. In this article, I examine both an object-oriented solution and an aspect-oriented solution to this problem. The comparison also demonstrates how aspect-oriented programming (AOP) complements object-oriented programming (OOP) by simplifying the solution to a seemingly difficult problem.

Author: Walter Jia
Published: JavaWorld, November 09, 2006