maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Fallows <john.r.fall...@gmail.com>
Subject Re: Delivering mock objects for a public API [was Re: [m2] custom compiler mojo]
Date Thu, 06 Oct 2005 19:06:34 GMT
On 9/28/05, Trygve Laugstøl <trygvis@codehaus.org> wrote:
> On Mon, 2005-09-26 at 22:02 +0000, John Fallows wrote:
> > On 9/25/05, Trygve Laugstøl <trygvis@codehaus.org> wrote:
> > > On Sat, 2005-09-24 at 04:31 +0000, John Fallows wrote:
> > > > On 9/23/05, Trygve Laugstøl <trygvis@codehaus.org> wrote:
> > > > > On Fri, 2005-09-23 at 08:03 +0000, John Fallows wrote:
>
> [snip]
>
> > > [1]: http://jira.codehaus.org/browse/MNG-932
> >
> > Yes, I understand that it would be generally useful to deliver a
> > subset of the unit test code as a JAR.
> >
> > The above proposal still stands though, although the name "mock" can
> > be treated as a placeholder for that subset until we have a better
> > name.
>
> Not sure I agree, what more than distributing the test do you need?

We need to make sure that not all the test code is delivered in the
JAR, just the mocks.

The reason is that this mock JAR is essentially a public API for
testing, so any other test implementation code for the API project
should not be included.

This will prevent test authors using the mock JAR from inadvertently
establishing a dependency on non-public test code in their own tests,
that would then break when the API tests are changed.

>
> > Alternatively, is there any mileage in the idea of having completely
> > separate sub-modules for main, mock, and test, all inside the
> > api-module?
>
> Don't think so, but I also think I'm missing some information here :)

Let me know what you think, now that the above additional requirement
is more clear.

Thanks in advance.

Kind Regards,
John Fallows.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message