You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jg...@apache.org on 2018/08/15 15:42:11 UTC

[20/26] tomee git commit: Consistent package names for MP Config TCK.

Consistent package names for MP Config TCK.


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

Branch: refs/heads/master
Commit: 85f7ce8ac8fb4ad8dcdd25c8b68c03d9c29fc0b3
Parents: 1ee19ed
Author: Roberto Cortez <ra...@yahoo.com>
Authored: Wed Aug 8 18:54:13 2018 +0100
Committer: Roberto Cortez <ra...@yahoo.com>
Committed: Mon Aug 13 16:36:35 2018 +0100

----------------------------------------------------------------------
 .../microprofile/config/ConfigurationBean.java  | 25 -------
 .../MicroProfileConfigTCKArchiveProcessor.java  | 21 ------
 .../config/MicroProfileConfigTCKExtension.java  | 11 ----
 .../config/MicroProfileConfigurationTest.java   | 69 --------------------
 .../tck/config/ConfigurationBean.java           | 25 +++++++
 .../MicroProfileConfigTCKArchiveProcessor.java  | 21 ++++++
 .../config/MicroProfileConfigTCKExtension.java  | 11 ++++
 .../config/MicroProfileConfigurationTest.java   | 69 ++++++++++++++++++++
 ....jboss.arquillian.core.spi.LoadableExtension |  2 +-
 9 files changed, 127 insertions(+), 127 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/85f7ce8a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/ConfigurationBean.java
----------------------------------------------------------------------
diff --git a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/ConfigurationBean.java b/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/ConfigurationBean.java
deleted file mode 100644
index 3193ad9..0000000
--- a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/ConfigurationBean.java
+++ /dev/null
@@ -1,25 +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.openejb.tck.microprofile.config;
-
-import org.eclipse.microprofile.config.ConfigProvider;
-
-public class ConfigurationBean {
-    public String getConfig() {
-        return ConfigProvider.getConfig().getValue("config.test", String.class);
-    }
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/85f7ce8a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKArchiveProcessor.java
----------------------------------------------------------------------
diff --git a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKArchiveProcessor.java b/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKArchiveProcessor.java
deleted file mode 100644
index cccd0ce..0000000
--- a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKArchiveProcessor.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.apache.openejb.tck.microprofile.config;
-
-import org.hamcrest.object.HasToString;
-import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor;
-import org.jboss.arquillian.test.spi.TestClass;
-import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.junit.Assert;
-
-import static org.apache.openejb.loader.JarLocation.jarLocation;
-
-public class MicroProfileConfigTCKArchiveProcessor implements ApplicationArchiveProcessor {
-    @Override
-    public void process(final Archive<?> archive, final TestClass testClass) {
-        if (archive instanceof WebArchive) {
-            final WebArchive war = WebArchive.class.cast(archive);
-            war.addAsLibrary(jarLocation(Assert.class));
-            war.addAsLibrary(jarLocation(HasToString.class));
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/85f7ce8a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKExtension.java
----------------------------------------------------------------------
diff --git a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKExtension.java b/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKExtension.java
deleted file mode 100644
index e30ece7..0000000
--- a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKExtension.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.apache.openejb.tck.microprofile.config;
-
-import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor;
-import org.jboss.arquillian.core.spi.LoadableExtension;
-
-public class MicroProfileConfigTCKExtension implements LoadableExtension {
-    @Override
-    public void register(final ExtensionBuilder extensionBuilder) {
-        extensionBuilder.service(ApplicationArchiveProcessor.class, MicroProfileConfigTCKArchiveProcessor.class);
-    }
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/85f7ce8a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigurationTest.java
----------------------------------------------------------------------
diff --git a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigurationTest.java b/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigurationTest.java
deleted file mode 100644
index 64e754d..0000000
--- a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigurationTest.java
+++ /dev/null
@@ -1,69 +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.openejb.tck.microprofile.config;
-
-import org.eclipse.microprofile.config.Config;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.testng.Arquillian;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.asset.EmptyAsset;
-import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-import javax.inject.Inject;
-
-import static org.testng.Assert.assertEquals;
-
-@Test
-public class MicroProfileConfigurationTest extends Arquillian {
-    @Deployment
-    public static WebArchive deploy() {
-        JavaArchive testJar = ShrinkWrap
-                .create(JavaArchive.class, "microprofile-configuration.jar")
-                .addClass(ConfigurationBean.class)
-                .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
-                .as(JavaArchive.class);
-
-        WebArchive war = ShrinkWrap
-                .create(WebArchive.class, "microprofile-configuration.war")
-                .addAsLibrary(testJar);
-
-        return war;
-    }
-
-    @Inject
-    private ConfigurationBean configurationBean;
-
-    @Test
-    public void testConfiguration() throws Exception {
-        assertEquals("SUCCESS", configurationBean.getConfig());
-    }
-
-    @Inject
-    private Config config;
-
-    @Test
-    public void testDynamicValueInPropertyConfigSource() {
-        String configKey = "tck.config.test.systemproperty.dynamic.value";
-        String configValue = "myDynamicValue;";
-
-        System.setProperty(configKey, configValue);
-        Assert.assertEquals(config.getValue(configKey, String.class), configValue);
-    }
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/85f7ce8a/tck/microprofile-tck/config/src/test/java/org/apache/tomee/microprofile/tck/config/ConfigurationBean.java
----------------------------------------------------------------------
diff --git a/tck/microprofile-tck/config/src/test/java/org/apache/tomee/microprofile/tck/config/ConfigurationBean.java b/tck/microprofile-tck/config/src/test/java/org/apache/tomee/microprofile/tck/config/ConfigurationBean.java
new file mode 100644
index 0000000..927b6d9
--- /dev/null
+++ b/tck/microprofile-tck/config/src/test/java/org/apache/tomee/microprofile/tck/config/ConfigurationBean.java
@@ -0,0 +1,25 @@
+/*
+ * 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.tomee.microprofile.tck.config;
+
+import org.eclipse.microprofile.config.ConfigProvider;
+
+public class ConfigurationBean {
+    public String getConfig() {
+        return ConfigProvider.getConfig().getValue("config.test", String.class);
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/85f7ce8a/tck/microprofile-tck/config/src/test/java/org/apache/tomee/microprofile/tck/config/MicroProfileConfigTCKArchiveProcessor.java
----------------------------------------------------------------------
diff --git a/tck/microprofile-tck/config/src/test/java/org/apache/tomee/microprofile/tck/config/MicroProfileConfigTCKArchiveProcessor.java b/tck/microprofile-tck/config/src/test/java/org/apache/tomee/microprofile/tck/config/MicroProfileConfigTCKArchiveProcessor.java
new file mode 100644
index 0000000..6679804
--- /dev/null
+++ b/tck/microprofile-tck/config/src/test/java/org/apache/tomee/microprofile/tck/config/MicroProfileConfigTCKArchiveProcessor.java
@@ -0,0 +1,21 @@
+package org.apache.tomee.microprofile.tck.config;
+
+import org.hamcrest.object.HasToString;
+import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor;
+import org.jboss.arquillian.test.spi.TestClass;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Assert;
+
+import static org.apache.openejb.loader.JarLocation.jarLocation;
+
+public class MicroProfileConfigTCKArchiveProcessor implements ApplicationArchiveProcessor {
+    @Override
+    public void process(final Archive<?> archive, final TestClass testClass) {
+        if (archive instanceof WebArchive) {
+            final WebArchive war = WebArchive.class.cast(archive);
+            war.addAsLibrary(jarLocation(Assert.class));
+            war.addAsLibrary(jarLocation(HasToString.class));
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/85f7ce8a/tck/microprofile-tck/config/src/test/java/org/apache/tomee/microprofile/tck/config/MicroProfileConfigTCKExtension.java
----------------------------------------------------------------------
diff --git a/tck/microprofile-tck/config/src/test/java/org/apache/tomee/microprofile/tck/config/MicroProfileConfigTCKExtension.java b/tck/microprofile-tck/config/src/test/java/org/apache/tomee/microprofile/tck/config/MicroProfileConfigTCKExtension.java
new file mode 100644
index 0000000..578ada9
--- /dev/null
+++ b/tck/microprofile-tck/config/src/test/java/org/apache/tomee/microprofile/tck/config/MicroProfileConfigTCKExtension.java
@@ -0,0 +1,11 @@
+package org.apache.tomee.microprofile.tck.config;
+
+import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor;
+import org.jboss.arquillian.core.spi.LoadableExtension;
+
+public class MicroProfileConfigTCKExtension implements LoadableExtension {
+    @Override
+    public void register(final ExtensionBuilder extensionBuilder) {
+        extensionBuilder.service(ApplicationArchiveProcessor.class, MicroProfileConfigTCKArchiveProcessor.class);
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/85f7ce8a/tck/microprofile-tck/config/src/test/java/org/apache/tomee/microprofile/tck/config/MicroProfileConfigurationTest.java
----------------------------------------------------------------------
diff --git a/tck/microprofile-tck/config/src/test/java/org/apache/tomee/microprofile/tck/config/MicroProfileConfigurationTest.java b/tck/microprofile-tck/config/src/test/java/org/apache/tomee/microprofile/tck/config/MicroProfileConfigurationTest.java
new file mode 100644
index 0000000..b125cb5
--- /dev/null
+++ b/tck/microprofile-tck/config/src/test/java/org/apache/tomee/microprofile/tck/config/MicroProfileConfigurationTest.java
@@ -0,0 +1,69 @@
+/*
+ * 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.tomee.microprofile.tck.config;
+
+import org.eclipse.microprofile.config.Config;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.testng.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import javax.inject.Inject;
+
+import static org.testng.Assert.assertEquals;
+
+@Test
+public class MicroProfileConfigurationTest extends Arquillian {
+    @Deployment
+    public static WebArchive deploy() {
+        JavaArchive testJar = ShrinkWrap
+                .create(JavaArchive.class, "microprofile-configuration.jar")
+                .addClass(ConfigurationBean.class)
+                .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
+                .as(JavaArchive.class);
+
+        WebArchive war = ShrinkWrap
+                .create(WebArchive.class, "microprofile-configuration.war")
+                .addAsLibrary(testJar);
+
+        return war;
+    }
+
+    @Inject
+    private ConfigurationBean configurationBean;
+
+    @Test
+    public void testConfiguration() throws Exception {
+        assertEquals("SUCCESS", configurationBean.getConfig());
+    }
+
+    @Inject
+    private Config config;
+
+    @Test
+    public void testDynamicValueInPropertyConfigSource() {
+        String configKey = "tck.config.test.systemproperty.dynamic.value";
+        String configValue = "myDynamicValue;";
+
+        System.setProperty(configKey, configValue);
+        Assert.assertEquals(config.getValue(configKey, String.class), configValue);
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/85f7ce8a/tck/microprofile-tck/config/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
----------------------------------------------------------------------
diff --git a/tck/microprofile-tck/config/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/tck/microprofile-tck/config/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
index 8644cce..d1c4d21 100644
--- a/tck/microprofile-tck/config/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
+++ b/tck/microprofile-tck/config/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
@@ -1 +1 @@
-org.apache.openejb.tck.microprofile.config.MicroProfileConfigTCKExtension
+org.apache.tomee.microprofile.tck.config.MicroProfileConfigTCKExtension