stylerContextMock.expects.getStyles()
.returns(stylesMock).any();
// Create an action that will invoke the iteratee's next method.
final MethodAction iteratorAction = new MethodAction() {
public Object perform(MethodActionEvent event)
throws Throwable {
StylerIteratee iteratee = (StylerIteratee) event.getArgument(
StylerIteratee.class);
assertEquals(IterationAction.CONTINUE,
iteratee.next(stylerMock));
return null;
}
};
// Create an action that will check that the matcher context and
// styles is being passed through correctly.
final MethodAction styleAction = new MethodAction() {
public Object perform(MethodActionEvent event)
throws Throwable {
StandardStylerContext context = (StandardStylerContext) event.getArgument(
StandardStylerContext.class);
assertSame("Styler context", context, stylerContextMock);