File tree 1 file changed +5
-8
lines changed
src/test/java/org/junit/tests/experimental/theories
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 17
17
public class AssumingInTheoriesTest {
18
18
19
19
@ Test
20
- public void noTheoryAnnotationMeansAssumeShouldIgnore (){
20
+ public void noTheoryAnnotationMeansAssumeShouldIgnore () {
21
21
Assume .assumeTrue (false );
22
22
}
23
23
24
24
@ Test
25
- public void theoryMeansOnlyAssumeShouldFail () throws InitializationError {
26
-
25
+ public void theoryMeansOnlyAssumeShouldFail () throws InitializationError {
27
26
JUnitCore junitRunner = new JUnitCore ();
28
27
Runner theoryRunner = new Theories (TheoryWithNoUnassumedParameters .class );
29
28
Request request = Request .runner (theoryRunner );
30
29
Result result = junitRunner .run (request );
31
- Assert .assertEquals ("A theory with no valid parameters did not fail." , 1 , result .getFailureCount ());
32
-
30
+ Assert .assertEquals (1 , result .getFailureCount ());
33
31
}
34
32
35
33
/**
36
34
* Simple class that SHOULD fail because no parameters are met.
37
35
*/
38
- public static class TheoryWithNoUnassumedParameters {
36
+ public static class TheoryWithNoUnassumedParameters {
39
37
40
38
@ DataPoint
41
39
public final static boolean FALSE = false ;
42
40
43
41
@ Theory
44
- public void theoryWithNoUnassumedParameters (boolean value )
45
- {
42
+ public void theoryWithNoUnassumedParameters (boolean value ) {
46
43
Assume .assumeTrue (value );
47
44
}
48
45
}
You can’t perform that action at this time.
0 commit comments