Understood. Junit 5 should be better than 4.

Thanks,
-Ian.

On Mon, Jan 7, 2019 at 1:38 PM Xin Wang <[email protected]> wrote:

> >  I noticed that you switch all junit API to jupiter engine which
> looks pretty new to the folks who has not touched junit5. I am wondering if
> the old API works or not in junit5.
>
> Yes, I switch all junit API to jupiter engine , for example, the base Api:
>  *org.junt.Test*  is changed to org.junit.jupiter.api.Test*, *
> *org.junt.Assert*   is changed to  * org.junit.jupiter.api.Assertions .
> *It's
> because , compared with junit4, junit5 has greatly refactoring the API
> path, and the basic API path is migrated from org.junt to
> org.junit.jupiter.api.
> The adaptation strategy of junit5 to junit4 is to put the jars of junit4
> and junit5 in the project at the same time. In this way, there will be
> JUnit4 and junit5 test cases in the project at the same time. I think this
> will lead to confusion, not clean code. So I switch the api to junit5
> directly.
>
>
>
>
> Ian Luo <[email protected]> 于2019年1月7日周一 上午11:27写道:
>
> > Xin,
> >
> > Your pull request looks pretty straightforward to me. I have only one
> minor
> > question: I noticed that you switch all junit API to jupiter engine which
> > looks pretty new to the folks who has not touched junit5. I am wondering
> if
> > the old API works or not in junit5.
> >
> > Thanks,
> > -Ian.
> >
> > On Sat, Jan 5, 2019 at 11:48 PM Xin Wang <[email protected]>
> wrote:
> >
> > > Hi all,
> > >    I want to upgrade the junit dependency of Dubbo, contains :
> > >
> > > * Functions*
> > >    1). Upgrade junit to junit 5
> > >    2). Upgrade the test cases
> > >
> > >    I create a issue[1] and a pr [2] , please discuss about this ,
> > >
> > > *Why do this ?*
> > >    1). Some new features:test extensions 、Future of JVM testing、easier
> > > parameterized tests
> > >    2).Java 8 lambda support
> > >    3).  Optimized api
> > >    4). Basically compatible with junit4
> > >   Please read the referenced article :《7 reasons why you should start
> > using
> > > JUnit 5 today》[3]
> > >
> > > *How to write junit5 test case ?*
> > >    Please see 《JUnit 5 User Guide》[4]
> > >
> > > What do you think about this ?
> > >
> > > [1] https://github.com/apache/incubator-dubbo/issues/3148
> > > [2] https://github.com/apache/incubator-dubbo/pull/3149
> > > [3]
> > >
> > >
> >
> http://dolszewski.com/testing/7-reasons-why-you-should-start-using-junit-5-today/
> > > [4] https://junit.org/junit5/docs/current/user-guide/
> > >
> >
>

Reply via email to