@@ -31,49 +31,49 @@ public void before() {
31
31
32
32
@ Test
33
33
public void passesTypeCheck_otherType_noRequires () {
34
- ValidatingVisitor subject = new ValidatingVisitor ("string" , reporter , null );
34
+ ValidatingVisitor subject = new ValidatingVisitor ("string" , reporter , null , null );
35
35
assertFalse (subject .passesTypeCheck (JSONObject .class , false , null ));
36
36
verifyZeroInteractions (reporter );
37
37
}
38
38
39
39
@ Test
40
40
public void passesTypeCheck_otherType_requires () {
41
- ValidatingVisitor subject = new ValidatingVisitor ("string" , reporter , null );
41
+ ValidatingVisitor subject = new ValidatingVisitor ("string" , reporter , null , null );
42
42
assertFalse (subject .passesTypeCheck (JSONObject .class , true , null ));
43
43
verify (reporter ).failure (JSONObject .class , "string" );
44
44
}
45
45
46
46
@ Test
47
47
public void passesTypeCheck_otherType_nullPermitted_nullObject () {
48
- ValidatingVisitor subject = new ValidatingVisitor (JSONObject .NULL , reporter , null );
48
+ ValidatingVisitor subject = new ValidatingVisitor (JSONObject .NULL , reporter , null , null );
49
49
assertFalse (subject .passesTypeCheck (JSONObject .class , true , Boolean .TRUE ));
50
50
verifyZeroInteractions (reporter );
51
51
}
52
52
53
53
@ Test
54
54
public void passesTypeCheck_otherType_nullPermitted_nullReference () {
55
- ValidatingVisitor subject = new ValidatingVisitor (null , reporter , null );
55
+ ValidatingVisitor subject = new ValidatingVisitor (null , reporter , null , null );
56
56
assertFalse (subject .passesTypeCheck (JSONObject .class , true , Boolean .TRUE ));
57
57
verifyZeroInteractions (reporter );
58
58
}
59
59
60
60
@ Test
61
61
public void passesTypeCheck_nullPermitted_nonNullValue () {
62
- ValidatingVisitor subject = new ValidatingVisitor ("string" , reporter , null );
62
+ ValidatingVisitor subject = new ValidatingVisitor ("string" , reporter , null , null );
63
63
assertFalse (subject .passesTypeCheck (JSONObject .class , true , Boolean .TRUE ));
64
64
verify (reporter ).failure (JSONObject .class , "string" );
65
65
}
66
66
67
67
@ Test
68
68
public void passesTypeCheck_requiresType_nullableIsNull () {
69
- ValidatingVisitor subject = new ValidatingVisitor (null , reporter , null );
69
+ ValidatingVisitor subject = new ValidatingVisitor (null , reporter , null , null );
70
70
assertFalse (subject .passesTypeCheck (JSONObject .class , true , null ));
71
71
verify (reporter ).failure (JSONObject .class , null );
72
72
}
73
73
74
74
@ Test
75
75
public void passesTypeCheck_sameType () {
76
- ValidatingVisitor subject = new ValidatingVisitor ("string" , reporter , null );
76
+ ValidatingVisitor subject = new ValidatingVisitor ("string" , reporter , null , null );
77
77
assertTrue (subject .passesTypeCheck (String .class , true , Boolean .TRUE ));
78
78
verifyZeroInteractions (reporter );
79
79
}
@@ -105,13 +105,13 @@ public Object[] notPermittedTypes() {
105
105
@ Test
106
106
@ Parameters (method = "permittedTypes" )
107
107
public void permittedTypeSuccess (Object subject ) {
108
- new ValidatingVisitor (subject , reporter , ReadWriteValidator .NONE );
108
+ new ValidatingVisitor (subject , reporter , ReadWriteValidator .NONE , null );
109
109
}
110
110
111
111
@ Test (expected = IllegalArgumentException .class )
112
112
@ Parameters (method = "notPermittedTypes" )
113
113
public void notPermittedTypeFailure (Object subject ) {
114
- new ValidatingVisitor (subject , reporter , ReadWriteValidator .NONE );
114
+ new ValidatingVisitor (subject , reporter , ReadWriteValidator .NONE , null );
115
115
}
116
116
117
117
}
0 commit comments