|
From: Johannes S. <mai...@ce...> - 2010-07-10 11:32:01
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi guys,
don't know where to post, so hopefully this list is the right one.
I run into some problems related to Theories and DataPoints (with 4.8.1):
This test is marked as successfull but did *not* run:
@RunWith( Theories.class )
public class TheoriesTest {
@Theory
public void aTheory( String arg ) {
System.out.println( "TheoriesTest.aTheory(" + arg + ")" );
assertNotNull( arg );
}
@DataPoint
public String getParam() {
return "daParam";
}
}
I think the problem lies in Theories:126.
statement.evaluate() catches exceptions silently
(org.junit.experimental.theories.Theories.TheoryAnchor#methodCompletesWithParameters:158).
Therefore "handleDataPointSuccess" is called even when an exception has
been thrown....
So I think there are at least two things missing:
- - Proper exception handling...
- - Checking the DataPoint(s) methods for the static keyword
By the way: Why isn't it allowed to return Iterables or at least Lists
in @DataPoints methods?
Thanks,
Johannes
- --
Johannes Schneider - blog.cedarsoft.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iQEcBAEBAgAGBQJMOFomAAoJEAytD9R7Qv6dOjoH/2Lde0wr10KtWyUDK2Xf+fB+
Fy8tBXmNvQiJAjdeA0zI+yt1SPg0dcWkrDOqLvP+3BBh+3uis1J4ZW0/1zU8zQhX
1tzeZ0S+gYopRnxxgc5Zmpc1ErD5kwNykwz0JbjGxFe6VccOvnjQp6BYRyoaKHOh
tXzoGKFCSjKU8N+xSzLouoVQmjfp4KsOTHYRpHeiPcvf9X33WlJ8/fIAlxYW6mvu
Fg8AoQ93BEQk4Qp6S1PeupRuconKOIViM8+E2a2lz9C8MKqo8WL9V+23J5fe7qvi
Y2OktebVLu54Vz48sfdhfDz+YhXRJegxDfbmXNx8+Sbn44yvLIpbk2mKW68aWrw=
=zW6R
-----END PGP SIGNATURE-----
|