[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: Re: RDF commons testing
From: Stian Soiland-Reyes <stain () apache ! org>
Date: 2017-01-30 14:10:44
Message-ID: 20170130141044.GB2350 () biggiebuntu
[Download RAW message or body]
On Mon, 30 Jan 2017 10:20:46 +0000, Stian Soiland-Reyes <stain@apache.org> wrote:
> BTW - in your approach, would it work to run the tests out of the box
> from an IDE like Eclipse? I think that is quite important so Commons RDF
> can be maintainable by many people in Apache Commons.
They did run out of the box in Eclipse thanks to the @TestRunner, and it
looks quite nice, separated out per interface contract tested:
https://raw.githubusercontent.com/stain/junit-contracts/patch-1/docs/junit-contracts.png
I was confused by your examples still using test class hierarchy like
"BarTest extends FooTest" which then turns out to be not needed at all.
Also I don't think there's generally a need to use the confusing
indirection of IProducer but rather give the instance to be tested
directly.
I was confused with @Contract.Inject being the annotation both for
the property to be set and the factory method to generate the
implementaton.
I added a suggestion to your README to show how junit-contracts can be
used with multiple interfaces and multiple implementations, using
java.util.Set as an example which I think many on this list will
be familiar with.
https://github.com/stain/junit-contracts/tree/patch-1#motivation
I also think the ability to have different @Before is a strong
argument - so this could be relevant in multiple project with
several interface implementaton, but also for Commons RDF.
--
Stian Soiland-Reyes
http://orcid.org/0000-0001-9842-9718
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic