views:

126

answers:

1

I'm trying to unit test my seam components, and so far I've been doing pretty well with the EasyMock that my team has been using.

However, I have run into a wall with javax.faces.context.ExternalContext.

Since it's not an interface, I can't run EasyMock.createMock() on it.

Seam has a MockExternalContext, but I have no idea how to use it.

A simple example would be most helpful, but I will also consider passionate cases for alternative mock frameworks.

A: 

Umm why don't you just use the EasyMock Class Extension. This extension allows you to generate Mock Objects for classes

EasyMock Class Extension Documentation

EasyMock Class Extension API

jitter
While this isn't exactly the answer I wanted, it got me to look at my pom file, and updating the version of easymock made the classextension versions work.Now I'm just left with using both easymock and easymock.classextension, which is ugly looking and confusing.
JBristow