11package test .org .javawebstack .validator ;
22
3- import org .javawebstack .abstractdata .AbstractMapper ;
3+ import org .javawebstack .abstractdata .mapper . Mapper ;
44import org .javawebstack .validator .Rule ;
55import org .javawebstack .validator .ValidationContext ;
66import org .javawebstack .validator .Validator ;
@@ -16,36 +16,36 @@ public class RequiredRuleTest {
1616 public void testSimpleRequiredRule () {
1717 Validator validator = Validator .getValidator (TestObject1 .class );
1818 TestObject1 test = new TestObject1 ();
19- assertFalse (validator .validate (new ValidationContext (), new AbstractMapper ().toAbstract (test )).isValid ());
19+ assertFalse (validator .validate (new ValidationContext (), new Mapper ().map (test )).isValid ());
2020 test .name = "Test" ;
2121 test .password = "123456" ;
22- assertTrue (validator .validate (new ValidationContext (), new AbstractMapper ().toAbstract (test )).isValid ());
22+ assertTrue (validator .validate (new ValidationContext (), new Mapper ().map (test )).isValid ());
2323 }
2424
2525 @ Test
2626 public void testEmptyStringOption () {
2727 Validator validator = Validator .getValidator (TestObject1 .class );
2828 TestObject1 test = new TestObject1 ();
2929 test .name = "" ;
30- assertFalse (validator .validate (new ValidationContext (), new AbstractMapper ().toAbstract (test )).isValid ());
30+ assertFalse (validator .validate (new ValidationContext (), new Mapper ().map (test )).isValid ());
3131 test .name = "Test" ;
3232 test .password = "" ;
33- assertTrue (validator .validate (new ValidationContext (), new AbstractMapper ().toAbstract (test )).isValid ());
33+ assertTrue (validator .validate (new ValidationContext (), new Mapper ().map (test )).isValid ());
3434 }
3535
3636 @ Test
3737 public void testInnerRequiredRule () {
3838 Validator validator = Validator .getValidator (TestObject2 .class );
3939 TestObject2 test = new TestObject2 ();
40- assertTrue (validator .validate (new ValidationContext (), new AbstractMapper ().toAbstract (test )).isValid ());
40+ assertTrue (validator .validate (new ValidationContext (), new Mapper ().map (test )).isValid ());
4141 test .inners = new TestObject2 .Inner [0 ];
42- assertTrue (validator .validate (new ValidationContext (), new AbstractMapper ().toAbstract (test )).isValid ());
42+ assertTrue (validator .validate (new ValidationContext (), new Mapper ().map (test )).isValid ());
4343 test .inners = new TestObject2 .Inner []{
4444 new TestObject2 .Inner ()
4545 };
46- assertFalse (validator .validate (new ValidationContext (), new AbstractMapper ().toAbstract (test )).isValid ());
46+ assertFalse (validator .validate (new ValidationContext (), new Mapper ().map (test )).isValid ());
4747 test .inners [0 ].name = "Test" ;
48- assertTrue (validator .validate (new ValidationContext (), new AbstractMapper ().toAbstract (test )).isValid ());
48+ assertTrue (validator .validate (new ValidationContext (), new Mapper ().map (test )).isValid ());
4949 }
5050
5151
0 commit comments