Tuesday, February 14, 2006

Controlling EasyMock Complexity

Easier EasyMock Testing "One strategy you might employ to try and combat this a little bit is by breaking up your single test method into several different ones. Using the above example, this might break down into something like testSomeMethod_Normal(), testSomeMethod_InfoNull(), testSomeMethod_InfoException(). This is a reasonable strategy in my opinion. It does now, however, relieve you from having so many replay(), and verify() method calls (reset() method calls wouldn't be needed since the setUp() takes care of it for you)."
Post a Comment