@@ -43,14 +43,16 @@ public class ScriptAssertValidatorTest extends AbstractConstrainedTest {
43
43
44
44
@ Test
45
45
public void scriptEvaluatesToTrue () throws Exception {
46
- @ ScriptAssert (lang = "groovy" , script = "true" ) class TmpType { }
46
+ @ ScriptAssert (lang = "groovy" , script = "true" ) class TmpType {
47
+ }
47
48
assertNoViolations ( validator .validate ( new TmpType () ) );
48
49
49
50
}
50
51
51
52
@ Test
52
53
public void scriptEvaluatesToFalse () throws Exception {
53
- @ ScriptAssert (lang = "groovy" , script = "false" ) class TmpType { }
54
+ @ ScriptAssert (lang = "groovy" , script = "false" ) class TmpType {
55
+ }
54
56
assertThat ( validator .validate ( new TmpType () ) ).containsOnlyViolations (
55
57
violationOf ( ScriptAssert .class )
56
58
);
@@ -107,28 +109,32 @@ public void emptyAliasRaisesException() throws Exception {
107
109
108
110
@ Test (expectedExceptions = ConstraintDeclarationException .class )
109
111
public void unknownLanguageNameRaisesException () throws Exception {
110
- @ ScriptAssert (lang = "foo" , script = "script" ) class TmpType { }
112
+ @ ScriptAssert (lang = "foo" , script = "script" ) class TmpType {
113
+ }
111
114
112
115
assertNoViolations ( validator .validate ( new TmpType () ) );
113
116
}
114
117
115
118
@ Test (expectedExceptions = ConstraintDeclarationException .class )
116
119
public void illegalScriptExpressionRaisesException () throws Exception {
117
- @ ScriptAssert (lang = "groovy" , script = "foo" ) class TmpType { }
120
+ @ ScriptAssert (lang = "groovy" , script = "foo" ) class TmpType {
121
+ }
118
122
119
123
assertNoViolations ( validator .validate ( new TmpType () ) );
120
124
}
121
125
122
126
@ Test (expectedExceptions = ConstraintDeclarationException .class )
123
127
public void scriptExpressionReturningNullRaisesException () throws Exception {
124
- @ ScriptAssert (lang = "groovy" , script = "null" ) class TmpType { }
128
+ @ ScriptAssert (lang = "groovy" , script = "null" ) class TmpType {
129
+ }
125
130
126
131
assertNoViolations ( validator .validate ( new TmpType () ) );
127
132
}
128
133
129
134
@ Test (expectedExceptions = ConstraintDeclarationException .class )
130
135
public void scriptExpressionReturningNoBooleanRaisesException () throws Exception {
131
- @ ScriptAssert (lang = "groovy" , script = "new java.util.Date()" ) class TmpType { }
136
+ @ ScriptAssert (lang = "groovy" , script = "new java.util.Date()" ) class TmpType {
137
+ }
132
138
133
139
assertNoViolations ( validator .validate ( new TmpType () ) );
134
140
}
0 commit comments