Hi to all.

I have an Integration Test where I want to mock the resulting value of a 
service's method.

I have no experience with JMock and seems quite different from mockito.

I see the "context" property defined on IntegrationTestAbstract, but not sure 
about how to best specify that whenever I invoke that service method, the 
result value should be "x".

I've looked at the samples at [1], but not sure about how to specify something 
like:

        // given
        // final UserAccount userAccount = this.service(UserAccount.class);
        this.context.checking(new Expectations() {
            {
                this.one([DOMAIN SERVICE]).locale();
                this.will(JMockActions.returnEach(new Locale("en")));
            }
        });


Any help, please?

Thanks,

Oscar


Reply via email to