Hi
I use easymock to mock service in the action classes.
In the spring context I add:
<bean id="MockedService" name="MockedService" class="org.easymock.EasyMock"
factory-method="createStrictMock">
<constructor-arg value="Interface.for.the.Service"/>
</bean>
Hope thats enough to give you a idea how it could work
Regards,
Pascal
On Wednesday 22 August 2012 15:33:26 Davis, Chad wrote:
> I would like to deploy my app to a UI testing / demo environment. In this
> environment, the regular business logic objects would be replaced ( via DI
> ) with mock implementations of those resources. These mocks would return a
> static data set, thus giving a predictable behavior against which we can
> build automated UI tests, provide a lightweight demo environment that
> doesn't need integrated into our rather large and complex real world data
> context, etc.
>
> My thoughts are to use the Spring integration to inject the mocks. I'm new
> to doing DI / testing in this kind of setting. Is anyone doing something
> like this? Can you share some experiences?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]