0
votes

Reading a jmock docs i see:

First we must import the jMock classes, define our test fixture class and create a "Mockery" that represents the context in which the Publisher exists. The context mocks out the objects that the Publisher collaborates with (in this case a Subscriber) and checks that they are used correctly during the test.

I like to know what mean "context in which the Publisher exists", this is a scope of the class or something like?

1

1 Answers

1
votes

It's overly formal language, it's only saying that the Mockery holds the record of all of the mock objects under test at any given time. In 99% of cases, each test case has one Mockery, and therefore the test case is the context.

The language used in that part of the docs seems more appropriate if you're thinking from the point of view of how JMock is designed internally, rather than as a writer of unit tests.