1
1
package cn .sticki .spel .validator .javax .bean ;
2
2
3
3
import cn .sticki .spel .validator .core .constrain .SpelAssert ;
4
- import cn .sticki .spel .validator .javax .SpelValid ;
5
4
import cn .sticki .spel .validator .javax .util .ID ;
6
5
import cn .sticki .spel .validator .javax .util .VerifyFailedField ;
7
6
import cn .sticki .spel .validator .javax .util .VerifyObject ;
20
19
public class SpelAssertTestBean {
21
20
22
21
@ Data
23
- @ SpelValid (spelGroups = "#this.group" )
22
+ // @SpelValid(spelGroups = "#this.group")
24
23
public static class ParamTestBean implements ID {
25
24
26
25
private int id ;
@@ -58,7 +57,7 @@ public static List<VerifyObject> paramTestCase() {
58
57
bean ,
59
58
VerifyFailedField .of (ParamTestBean ::getTest2 ),
60
59
VerifyFailedField .of (ParamTestBean ::getTest4 , "test4" )
61
- ));
60
+ ). setGroups ( "#this.group" ) );
62
61
63
62
ParamTestBean bean2 = new ParamTestBean ();
64
63
bean2 .setId (2 );
@@ -68,7 +67,7 @@ public static List<VerifyObject> paramTestCase() {
68
67
bean2 ,
69
68
VerifyFailedField .of (ParamTestBean ::getTest2 ),
70
69
VerifyFailedField .of (ParamTestBean ::getTest5 , "group1" )
71
- ));
70
+ ). setGroups ( "#this.group" ) );
72
71
73
72
ParamTestBean bean3 = new ParamTestBean ();
74
73
bean3 .setId (3 );
@@ -77,7 +76,7 @@ public static List<VerifyObject> paramTestCase() {
77
76
list .add (VerifyObject .of (
78
77
bean3 ,
79
78
VerifyFailedField .of (ParamTestBean ::getTest2 )
80
- ));
79
+ ). setGroups ( "#this.group" ) );
81
80
82
81
ParamTestBean bean4 = new ParamTestBean ();
83
82
bean4 .setId (4 );
@@ -88,13 +87,13 @@ public static List<VerifyObject> paramTestCase() {
88
87
VerifyFailedField .of (ParamTestBean ::getTest2 ),
89
88
VerifyFailedField .of (ParamTestBean ::getTest4 , "test4" ),
90
89
VerifyFailedField .of (ParamTestBean ::getTest6 , "group2" )
91
- ));
90
+ ). setGroups ( "#this.group" ) );
92
91
93
92
return list ;
94
93
}
95
94
96
95
@ Data
97
- @ SpelValid
96
+ // @SpelValid
98
97
public static class EmptyTestBean {
99
98
100
99
@ SpelAssert (condition = "true" , assertTrue = "" )
0 commit comments