You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kerby@directory.apache.org by Emmanuel Lécharny <el...@gmail.com> on 2015/12/30 12:01:37 UTC

Tests name

Hi,

I would strongly suggest that the tests name are to be a composition of
<Class being tested><"Test"> instead of <"Test"><Class being tested> :
it makes it way easier to find the test in an IDE.

It's a bit a burden to find the test when you have a list like that :

TestAsRepCodec.java
TestAsReqCodec.java
TestPaPkAsRep.java
TestPkinitAnonymousAsRepCodec.java
TestPkinitAnonymousAsReqCodec.java
TestPkinitRsaAsRepCodec.java
TestPkinitRsaAsReqCodec.java
TestTgsRepCodec.java
TestTgsReqCodec.java


where all the tests starts with 'Test'...

RE: Tests name

Posted by "Li, Jiajia" <ji...@intel.com>.
I can take some time to make all the test to be NameTest style.

-----Original Message-----
From: Zheng, Kai [mailto:kai.zheng@intel.com] 
Sent: Wednesday, December 30, 2015 7:27 PM
To: kerby@directory.apache.org
Subject: RE: Tests name

Yeah, kinds of messy. So let's use the NameTest style for the consistency. It makes sense to pay attention to the test codes because some developer is already wishing to use them for their own sake, some of production codes initially started with test codes and some serve good samples to demo how to use the library APIs.

Regards,
Kai

-----Original Message-----
From: Emmanuel Lécharny [mailto:elecharny@gmail.com] 
Sent: Wednesday, December 30, 2015 7:18 PM
To: kerby@directory.apache.org
Subject: Re: Tests name

Le 30/12/15 12:13, Zheng, Kai a écrit :
> Either TestXXX or XXXTest works to me, but better use only one style consistently if we would prefer one. I've seen both used in other projects. 
> Thanks.

Absolutly. In the same package, we have both styles being used :

CodecTest.java
CodecTestUtil.java
KerberosTimeTest.java
TestAsRepCodec.java
TestAsReqCodec.java
TestPaPkAsRep.java
TestPkinitAnonymousAsRepCodec.java
TestPkinitAnonymousAsReqCodec.java
TestPkinitRsaAsRepCodec.java
TestPkinitRsaAsReqCodec.java
TestTgsRepCodec.java
TestTgsReqCodec.java

I'd rather use the NameTest format rather than TestName, as many of the other Kerby modules are already doing, but if the Kerby community decide to pick the other scheme, that would be fine.

Kai just expressed the concern much better than I did...



RE: Tests name

Posted by "Zheng, Kai" <ka...@intel.com>.
Yeah, kinds of messy. So let's use the NameTest style for the consistency. It makes sense to pay attention to the test codes because some developer is already wishing to use them for their own sake, some of production codes initially started with test codes and some serve good samples to demo how to use the library APIs.

Regards,
Kai

-----Original Message-----
From: Emmanuel Lécharny [mailto:elecharny@gmail.com] 
Sent: Wednesday, December 30, 2015 7:18 PM
To: kerby@directory.apache.org
Subject: Re: Tests name

Le 30/12/15 12:13, Zheng, Kai a écrit :
> Either TestXXX or XXXTest works to me, but better use only one style consistently if we would prefer one. I've seen both used in other projects. 
> Thanks.

Absolutly. In the same package, we have both styles being used :

CodecTest.java
CodecTestUtil.java
KerberosTimeTest.java
TestAsRepCodec.java
TestAsReqCodec.java
TestPaPkAsRep.java
TestPkinitAnonymousAsRepCodec.java
TestPkinitAnonymousAsReqCodec.java
TestPkinitRsaAsRepCodec.java
TestPkinitRsaAsReqCodec.java
TestTgsRepCodec.java
TestTgsReqCodec.java

I'd rather use the NameTest format rather than TestName, as many of the other Kerby modules are already doing, but if the Kerby community decide to pick the other scheme, that would be fine.

Kai just expressed the concern much better than I did...



Re: Tests name

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 30/12/15 12:13, Zheng, Kai a écrit :
> Either TestXXX or XXXTest works to me, but better use only one style consistently if we would prefer one. I've seen both used in other projects. 
> Thanks.

Absolutly. In the same package, we have both styles being used :

CodecTest.java
CodecTestUtil.java
KerberosTimeTest.java
TestAsRepCodec.java
TestAsReqCodec.java
TestPaPkAsRep.java
TestPkinitAnonymousAsRepCodec.java
TestPkinitAnonymousAsReqCodec.java
TestPkinitRsaAsRepCodec.java
TestPkinitRsaAsReqCodec.java
TestTgsRepCodec.java
TestTgsReqCodec.java

I'd rather use the NameTest format rather than TestName, as many of the
other Kerby modules are already doing, but if the Kerby community decide
to pick the other scheme, that would be fine.

Kai just expressed the concern much better than I did...



RE: Tests name

Posted by "Zheng, Kai" <ka...@intel.com>.
Either TestXXX or XXXTest works to me, but better use only one style consistently if we would prefer one. I've seen both used in other projects. 
Thanks.

Regards,
Kai

-----Original Message-----
From: Emmanuel Lécharny [mailto:elecharny@gmail.com] 
Sent: Wednesday, December 30, 2015 7:02 PM
To: kerby@directory.apache.org
Subject: Tests name

Hi,

I would strongly suggest that the tests name are to be a composition of <Class being tested><"Test"> instead of <"Test"><Class being tested> :
it makes it way easier to find the test in an IDE.

It's a bit a burden to find the test when you have a list like that :

TestAsRepCodec.java
TestAsReqCodec.java
TestPaPkAsRep.java
TestPkinitAnonymousAsRepCodec.java
TestPkinitAnonymousAsReqCodec.java
TestPkinitRsaAsRepCodec.java
TestPkinitRsaAsReqCodec.java
TestTgsRepCodec.java
TestTgsReqCodec.java


where all the tests starts with 'Test'...