bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject [11/51] [abbrv] bval git commit: consolidate
Date Fri, 03 Nov 2017 22:27:36 GMT
consolidate


Project: http://git-wip-us.apache.org/repos/asf/bval/repo
Commit: http://git-wip-us.apache.org/repos/asf/bval/commit/e10ec52a
Tree: http://git-wip-us.apache.org/repos/asf/bval/tree/e10ec52a
Diff: http://git-wip-us.apache.org/repos/asf/bval/diff/e10ec52a

Branch: refs/heads/master
Commit: e10ec52a9f1b4808c332cc7eb264a587ce368373
Parents: f6737c2
Author: Matt Benson <mbenson@apache.org>
Authored: Thu Oct 20 16:23:15 2016 +0000
Committer: Matt Benson <mbenson@apache.org>
Committed: Thu Oct 20 16:23:15 2016 +0000

----------------------------------------------------------------------
 .../bval/constraints/DecimalMinMaxValidatorsTest.java  | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bval/blob/e10ec52a/bval-jsr/src/test/java/org/apache/bval/constraints/DecimalMinMaxValidatorsTest.java
----------------------------------------------------------------------
diff --git a/bval-jsr/src/test/java/org/apache/bval/constraints/DecimalMinMaxValidatorsTest.java
b/bval-jsr/src/test/java/org/apache/bval/constraints/DecimalMinMaxValidatorsTest.java
index 518c7a1..085ff35 100644
--- a/bval-jsr/src/test/java/org/apache/bval/constraints/DecimalMinMaxValidatorsTest.java
+++ b/bval-jsr/src/test/java/org/apache/bval/constraints/DecimalMinMaxValidatorsTest.java
@@ -23,11 +23,10 @@ import static org.junit.Assert.assertFalse;
 import java.util.Set;
 
 import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.Validator;
 import javax.validation.constraints.DecimalMax;
 import javax.validation.constraints.DecimalMin;
 
+import org.apache.bval.jsr.ValidationTestBase;
 import org.junit.Test;
 
 /**
@@ -36,7 +35,7 @@ import org.junit.Test;
  * Date: 06.04.2010<br>
  * Time: 13:45:09<br>
  */
-public class DecimalMinMaxValidatorsTest {
+public class DecimalMinMaxValidatorsTest extends ValidationTestBase {
 
     @DecimalMin("922392239223.06")
     public double dmin;
@@ -45,23 +44,19 @@ public class DecimalMinMaxValidatorsTest {
 
     @Test
     public void testDecimalMinValue() {
-        Validator v = Validation.buildDefaultValidatorFactory().getValidator();
-
         this.dmin = 922392239223.05;
         this.dmax = 922392239223.08;
 
-        Set<ConstraintViolation<DecimalMinMaxValidatorsTest>> res = v.validate(this);
+        Set<ConstraintViolation<DecimalMinMaxValidatorsTest>> res = validator.validate(this);
         assertFalse("Min validation failed", res.isEmpty());
     }
 
     @Test
     public void testDecimalMaxValue() {
-        Validator v = Validation.buildDefaultValidatorFactory().getValidator();
-
         this.dmin = Double.MAX_VALUE;
         this.dmax = 922392239223.1;
 
-        Set<ConstraintViolation<DecimalMinMaxValidatorsTest>> res = v.validate(this);
+        Set<ConstraintViolation<DecimalMinMaxValidatorsTest>> res = validator.validate(this);
         assertFalse("Max validation failed", res.isEmpty());
     }
 


Mime
View raw message