Re: JUnit-BDD

David Saff <[email protected]> Fri, 18 Apr 2014 13:41:13 -0400
Newsgroups gmane.comp.java.junit.user
Message-ID <CALrw-Pz5wqH-xvkce+EQpcrsHBOEif+xRCW=JDzzqGuNxkL-7g@mail.gmail.com>
I think that Java 8 lambdas open up a lot of opportunities to accomplish
JUnit's goals in completely different ways.  I've been exploring with one
approach myself on and off.  For one thing, to date, JUnit has relied on
specially-named or annotated methods to accomplish the goal of succinctly
associating a name with a block of code.  In Java 8, one can just do:

addTest("Some test name", () -> {
   // some code here
})

In short, I think that it might make sense to play with several different
approaches to testing Java 8 before blessing one of them as the "official
JUnit approach".

   David


On Fri, Apr 18, 2014 at 4:23 AM, Lovro Pandzic <[email protected]>wrote:

>
>
> Hello all,
>
> I mentioned JUnit-BDD project (http://github.com/lpandzic/junit-bdd) in a
> issue on JUnit github issue (http://github.com/junit-team/junit/issues/722)
> and to prevent polluting that issue's page I'd like to continue the
> discussion here.
>
> I've continued my work on the project and decided to abandon the proxy
> approach and continue with Java 8 lambdas which both simplifies it for end
> users and maintaining.
> If any of you have time and will to try it out and comment I'd be grateful.
>
> I have a question regarding JUnit projects future and to continue from
> Tibor17's reply:
>
> Since the community is quite huge some JUnit functionalities can be
>> developed by the same community in separate Maven module. As a result the
>> main module does not have to wait for a sub-module release. When new
>> version of sub-module is ready, the main one will be associated. So both
>> would be developed by the same team but the version will be different. I
>> think this should speed up the realease of JUnit core.
>
>
> Is there a plan for JUnit Java 8 module in the future?
>
> Thanks,
> Lovro
>
>  
>