deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johndam...@apache.org
Subject [3/3] git commit: DELTASPIKE-387 Changed test package name.
Date Mon, 24 Jun 2013 01:36:11 GMT
DELTASPIKE-387 Changed test package name.


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

Branch: refs/heads/master
Commit: 2f322a0e8cc2324b9485e9a779a38709217f36ba
Parents: c4d5975
Author: John D. Ament <john.d.ament@gmail.com>
Authored: Sun Jun 23 21:35:20 2013 -0400
Committer: John D. Ament <john.d.ament@gmail.com>
Committed: Sun Jun 23 21:35:20 2013 -0400

----------------------------------------------------------------------
 .../beanValidation/test/ArchiveUtils.java       | 32 ++++++++
 .../beanValidation/test/ArrayChecker.java       | 29 ++++++++
 .../beanValidation/test/ArraySize.java          | 46 ++++++++++++
 .../beanValidation/test/BasicPojo.java          | 36 +++++++++
 .../test/InjectableConstraintValidator.java     | 45 +++++++++++
 .../test/InjectedValidationTest.java            | 78 ++++++++++++++++++++
 .../deltaspike/beanval/test/ArchiveUtils.java   | 32 --------
 .../deltaspike/beanval/test/ArrayChecker.java   | 29 --------
 .../deltaspike/beanval/test/ArraySize.java      | 46 ------------
 .../deltaspike/beanval/test/BasicPojo.java      | 36 ---------
 .../test/InjectableConstraintValidator.java     | 45 -----------
 .../beanval/test/InjectedValidationTest.java    | 78 --------------------
 12 files changed, 266 insertions(+), 266 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f322a0e/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/ArchiveUtils.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/ArchiveUtils.java
b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/ArchiveUtils.java
new file mode 100644
index 0000000..24278ba
--- /dev/null
+++ b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/ArchiveUtils.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.deltaspike.beanValidation.test;
+
+import org.apache.deltaspike.test.utils.ShrinkWrapArchiveUtil;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+
+public class ArchiveUtils {
+    public static JavaArchive[] getDeltaSpikeCore() {
+        JavaArchive[] coreArchives = ShrinkWrapArchiveUtil.getArchives(null,
+                "META-INF/beans.xml",
+                new String[]{"org.apache.deltaspike.core", "org.apache.deltaspike.test.category"},
+                null);
+        return coreArchives;
+    }
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f322a0e/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/ArrayChecker.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/ArrayChecker.java
b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/ArrayChecker.java
new file mode 100644
index 0000000..35542df
--- /dev/null
+++ b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/ArrayChecker.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.deltaspike.beanValidation.test;
+
+public class ArrayChecker {
+    public boolean checkArray(ArraySize as, String[] data) {
+        if (data.length < as.min() || data.length > as.max()) {
+             return false;
+        } else {
+             return true;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f322a0e/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/ArraySize.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/ArraySize.java
b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/ArraySize.java
new file mode 100644
index 0000000..4f85aa3
--- /dev/null
+++ b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/ArraySize.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.deltaspike.beanValidation.test;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Constraint(validatedBy = InjectableConstraintValidator.class)
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface ArraySize {
+    int min() default 0;
+    int max() default Integer.MAX_VALUE;
+    String message() default "{org.apache.deltaspike.modules.beanval.constraints.arraySize}";
+
+    Class<?>[] groups() default {};
+
+    Class<? extends Payload>[] payload() default {};
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f322a0e/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/BasicPojo.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/BasicPojo.java
b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/BasicPojo.java
new file mode 100644
index 0000000..8064598
--- /dev/null
+++ b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/BasicPojo.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.deltaspike.beanValidation.test;
+
+public class BasicPojo
+{
+    @ArraySize(min=1)
+    private String[] value;
+
+    public String[] getValue()
+    {
+        return value;
+    }
+
+    public void setValue(String[] value)
+    {
+        this.value = value;
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f322a0e/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/InjectableConstraintValidator.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/InjectableConstraintValidator.java
b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/InjectableConstraintValidator.java
new file mode 100644
index 0000000..731c1f7
--- /dev/null
+++ b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/InjectableConstraintValidator.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.deltaspike.beanValidation.test;
+
+import javax.inject.Inject;
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+public class InjectableConstraintValidator implements
+        ConstraintValidator<ArraySize, String[]>
+{
+    @Inject
+    private ArrayChecker arrayChecker;
+
+    private ArraySize arraySize;
+
+    @Override
+    public void initialize(ArraySize arraySize)
+    {
+        this.arraySize = arraySize;
+    }
+
+    @Override
+    public boolean isValid(String[] values, ConstraintValidatorContext context)
+    {
+       return arrayChecker.checkArray(arraySize, values);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f322a0e/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/InjectedValidationTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/InjectedValidationTest.java
b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/InjectedValidationTest.java
new file mode 100644
index 0000000..d2f9196
--- /dev/null
+++ b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanValidation/test/InjectedValidationTest.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.deltaspike.beanValidation.test;
+
+import java.util.Set;
+
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.Validator;
+
+import org.apache.deltaspike.beanValidation.impl.CDIAwareConstraintValidatorFactory;
+import org.apache.deltaspike.test.category.WebProfileCategory;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+
+@RunWith(Arquillian.class)
+@Category(WebProfileCategory.class)
+public class InjectedValidationTest
+{
+    @Deployment
+    public static WebArchive createArchive()
+    {
+        return ShrinkWrap.create(WebArchive.class,"beanval.war")
+                .addClasses(BasicPojo.class,InjectableConstraintValidator.class,
+                        CDIAwareConstraintValidatorFactory.class,ArraySize.class,
+                        ArrayChecker.class)
+                .addAsWebInfResource("validation.xml", "classes/META-INF/validation.xml")
+                .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
+                .addAsLibraries(ArchiveUtils.getDeltaSpikeCore());
+    }
+    
+    private Validator validator;
+    
+    @Before
+    public void initValidator()
+    {
+        this.validator = Validation.buildDefaultValidatorFactory().getValidator();
+    }
+    
+    @Test
+    public void testValidate()
+    {
+        String[] entries = new String[]{"abc","def","ghi"};
+        BasicPojo p = new BasicPojo();
+        p.setValue(entries);
+        final Set<ConstraintViolation<BasicPojo>> violations = validator.validate(p);
+        StringBuilder sb = new StringBuilder();
+        for(ConstraintViolation<BasicPojo> violation : violations) {
+            sb.append(violation.getMessage() + " "+ violation.getPropertyPath());
+        }
+        Assert.assertTrue(sb.toString(),violations.isEmpty());
+        
+    }
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f322a0e/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/ArchiveUtils.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/ArchiveUtils.java
b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/ArchiveUtils.java
deleted file mode 100644
index 90dacd6..0000000
--- a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/ArchiveUtils.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.deltaspike.beanval.test;
-
-import org.apache.deltaspike.test.utils.ShrinkWrapArchiveUtil;
-import org.jboss.shrinkwrap.api.spec.JavaArchive;
-
-public class ArchiveUtils {
-    public static JavaArchive[] getDeltaSpikeCore() {
-        JavaArchive[] coreArchives = ShrinkWrapArchiveUtil.getArchives(null,
-                "META-INF/beans.xml",
-                new String[]{"org.apache.deltaspike.core", "org.apache.deltaspike.test.category"},
-                null);
-        return coreArchives;
-    }
-}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f322a0e/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/ArrayChecker.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/ArrayChecker.java
b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/ArrayChecker.java
deleted file mode 100644
index 0f6c550..0000000
--- a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/ArrayChecker.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.deltaspike.beanval.test;
-
-public class ArrayChecker {
-    public boolean checkArray(ArraySize as, String[] data) {
-        if (data.length < as.min() || data.length > as.max()) {
-             return false;
-        } else {
-             return true;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f322a0e/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/ArraySize.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/ArraySize.java
b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/ArraySize.java
deleted file mode 100644
index afa4cd8..0000000
--- a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/ArraySize.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.deltaspike.beanval.test;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-@Constraint(validatedBy = InjectableConstraintValidator.class)
-@Target({ TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-public @interface ArraySize {
-    int min() default 0;
-    int max() default Integer.MAX_VALUE;
-    String message() default "{org.apache.deltaspike.modules.beanval.constraints.arraySize}";
-
-    Class<?>[] groups() default {};
-
-    Class<? extends Payload>[] payload() default {};
-}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f322a0e/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/BasicPojo.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/BasicPojo.java
b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/BasicPojo.java
deleted file mode 100644
index 1b8c50a..0000000
--- a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/BasicPojo.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.deltaspike.beanval.test;
-
-public class BasicPojo
-{
-    @ArraySize(min=1)
-    private String[] value;
-
-    public String[] getValue()
-    {
-        return value;
-    }
-
-    public void setValue(String[] value)
-    {
-        this.value = value;
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f322a0e/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/InjectableConstraintValidator.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/InjectableConstraintValidator.java
b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/InjectableConstraintValidator.java
deleted file mode 100644
index b8475c4..0000000
--- a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/InjectableConstraintValidator.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.deltaspike.beanval.test;
-
-import javax.inject.Inject;
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-public class InjectableConstraintValidator implements
-        ConstraintValidator<ArraySize, String[]>
-{
-    @Inject
-    private ArrayChecker arrayChecker;
-
-    private ArraySize arraySize;
-
-    @Override
-    public void initialize(ArraySize arraySize)
-    {
-        this.arraySize = arraySize;
-    }
-
-    @Override
-    public boolean isValid(String[] values, ConstraintValidatorContext context)
-    {
-       return arrayChecker.checkArray(arraySize, values);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f322a0e/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/InjectedValidationTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/InjectedValidationTest.java
b/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/InjectedValidationTest.java
deleted file mode 100644
index e08fcae..0000000
--- a/deltaspike/modules/bean-validation/impl/src/test/java/org/apache/deltaspike/beanval/test/InjectedValidationTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.deltaspike.beanval.test;
-
-import java.util.Set;
-
-import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.Validator;
-
-import org.apache.deltaspike.beanValidation.impl.CDIAwareConstraintValidatorFactory;
-import org.apache.deltaspike.test.category.WebProfileCategory;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.asset.EmptyAsset;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
-
-@RunWith(Arquillian.class)
-@Category(WebProfileCategory.class)
-public class InjectedValidationTest
-{
-    @Deployment
-    public static WebArchive createArchive()
-    {
-        return ShrinkWrap.create(WebArchive.class,"beanval.war")
-                .addClasses(BasicPojo.class,InjectableConstraintValidator.class,
-                        CDIAwareConstraintValidatorFactory.class,ArraySize.class,
-                        ArrayChecker.class)
-                .addAsWebInfResource("validation.xml", "classes/META-INF/validation.xml")
-                .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
-                .addAsLibraries(ArchiveUtils.getDeltaSpikeCore());
-    }
-    
-    private Validator validator;
-    
-    @Before
-    public void initValidator()
-    {
-        this.validator = Validation.buildDefaultValidatorFactory().getValidator();
-    }
-    
-    @Test
-    public void testValidate()
-    {
-        String[] entries = new String[]{"abc","def","ghi"};
-        BasicPojo p = new BasicPojo();
-        p.setValue(entries);
-        final Set<ConstraintViolation<BasicPojo>> violations = validator.validate(p);
-        StringBuilder sb = new StringBuilder();
-        for(ConstraintViolation<BasicPojo> violation : violations) {
-            sb.append(violation.getMessage() + " "+ violation.getPropertyPath());
-        }
-        Assert.assertTrue(sb.toString(),violations.isEmpty());
-        
-    }
-}


Mime
View raw message