Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TCK tests for Profile #572

Merged
merged 1 commit into from
Jun 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.eclipse.microprofile.config.tck.profile;


import static org.hamcrest.MatcherAssert.assertThat;

import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;


import javax.enterprise.context.Dependent;
import javax.enterprise.inject.spi.CDI;
import javax.inject.Inject;
Expand All @@ -44,11 +40,10 @@

/**
* Test cases for Config profile
*
*
* @author Emily Jiang
*/
public class DevConfigProfileTest extends Arquillian {

@Deployment
public static Archive deployment() {
JavaArchive testJar = ShrinkWrap
Expand All @@ -63,13 +58,13 @@ public static Archive deployment() {
"vehicle.name=car"),
"microprofile-config.properties")
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
.as(JavaArchive.class);
.as(JavaArchive.class);

WebArchive war = ShrinkWrap
.create(WebArchive.class, "DevConfigProfileTest.war")
.addAsLibrary(testJar);
return war;

}

@Test
Expand All @@ -87,5 +82,5 @@ public static class ProfilePropertyBean {
public String getConfigProperty() {
return vehicleName;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.eclipse.microprofile.config.tck.profile;


import static org.hamcrest.MatcherAssert.assertThat;

import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;


import javax.enterprise.context.Dependent;
import javax.enterprise.inject.spi.CDI;
import javax.inject.Inject;

import org.eclipse.microprofile.config.ConfigProvider;
import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.eclipse.microprofile.config.tck.base.AbstractTest;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.testng.Arquillian;
import org.jboss.shrinkwrap.api.Archive;
Expand All @@ -45,11 +40,10 @@

/**
* Test cases for Config profile
*
*
* @author Emily Jiang
*/
public class InvalidConfigProfileTest extends Arquillian {

@Deployment
public static Archive deployment() {
JavaArchive testJar = ShrinkWrap
Expand All @@ -66,8 +60,6 @@ public static Archive deployment() {
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
.as(JavaArchive.class);

AbstractTest.addFile(testJar, "META-INF/microprofile-config.properties");

WebArchive war = ShrinkWrap
.create(WebArchive.class, "InvalidConfigProfileTest.war")
.addAsLibrary(testJar);
Expand All @@ -89,5 +81,5 @@ public static class ProfilePropertyBean {
public String getConfigProperty() {
return vehicleName;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.eclipse.microprofile.config.tck.profile;


import static org.hamcrest.MatcherAssert.assertThat;

import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;


import javax.enterprise.context.Dependent;
import javax.enterprise.inject.spi.CDI;
import javax.inject.Inject;

import org.eclipse.microprofile.config.ConfigProvider;
import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.eclipse.microprofile.config.tck.base.AbstractTest;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.testng.Arquillian;
import org.jboss.shrinkwrap.api.Archive;
Expand All @@ -45,11 +40,10 @@

/**
* Test cases for Config profile
*
*
* @author Emily Jiang
*/
public class ProdProfileTest extends Arquillian {

@Deployment
public static Archive deployment() {
JavaArchive testJar = ShrinkWrap
Expand All @@ -66,8 +60,6 @@ public static Archive deployment() {
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
.as(JavaArchive.class);

AbstractTest.addFile(testJar, "META-INF/microprofile-config.properties");

WebArchive war = ShrinkWrap
.create(WebArchive.class, "ProdProfileTest.war")
.addAsLibrary(testJar);
Expand All @@ -89,5 +81,5 @@ public static class ProfilePropertyBean {
public String getConfigProperty() {
return vehicleName;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.eclipse.microprofile.config.tck.profile;


import static org.hamcrest.MatcherAssert.assertThat;

import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;


import javax.enterprise.context.Dependent;
import javax.enterprise.inject.spi.CDI;
import javax.inject.Inject;

import org.eclipse.microprofile.config.ConfigProvider;
import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.eclipse.microprofile.config.tck.base.AbstractTest;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.testng.Arquillian;
import org.jboss.shrinkwrap.api.Archive;
Expand All @@ -45,11 +40,10 @@

/**
* Test cases for Config profile
*
*
* @author Emily Jiang
*/
public class TestConfigProfileTest extends Arquillian {

@Deployment
public static Archive deployment() {
JavaArchive testJar = ShrinkWrap
Expand All @@ -66,13 +60,10 @@ public static Archive deployment() {
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
.as(JavaArchive.class);

AbstractTest.addFile(testJar, "META-INF/microprofile-config.properties");

WebArchive war = ShrinkWrap
.create(WebArchive.class, "TestConfigProfileTest.war")
.addAsLibrary(testJar);
return war;

}

@Test
Expand All @@ -90,5 +81,5 @@ public static class ProfilePropertyBean {
public String getConfigProperty() {
return vehicleName;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.eclipse.microprofile.config.tck.profile;


import static org.hamcrest.MatcherAssert.assertThat;

import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;


import javax.enterprise.context.Dependent;
import javax.enterprise.inject.spi.CDI;
import javax.inject.Inject;

import org.eclipse.microprofile.config.ConfigProvider;
import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.eclipse.microprofile.config.spi.ConfigSource;
import org.eclipse.microprofile.config.tck.base.AbstractTest;
import org.eclipse.microprofile.config.tck.configsources.CustomConfigProfileConfigSource;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.testng.Arquillian;
Expand All @@ -47,11 +42,10 @@

/**
* Test cases for Config profile
*
*
* @author Emily Jiang
*/
public class TestCustomConfigProfile extends Arquillian {

@Deployment
public static Archive deployment() {
JavaArchive testJar = ShrinkWrap
Expand All @@ -69,13 +63,10 @@ public static Archive deployment() {
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
.as(JavaArchive.class);

AbstractTest.addFile(testJar, "META-INF/microprofile-config.properties");

WebArchive war = ShrinkWrap
.create(WebArchive.class, "TestConfigProfileTest.war")
.addAsLibrary(testJar);
return war;

}

@Test
Expand All @@ -93,5 +84,5 @@ public static class ProfilePropertyBean {
public String getConfigProperty() {
return vehicleName;
}
}
}
}