@@ -0,0 +1,2485 @@
+/*%0A * Copyright (c) 2016-2017 Mark Struberg and others%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A *%0A */%0Apackage org.eclipse.microprofile.config.tck.broken;%0A%0Aimport javax.enterprise.context.RequestScoped;%0Aimport javax.enterprise.inject.spi.DeploymentException;%0Aimport javax.inject.Inject;%0A%0Aimport org.eclipse.microprofile.config.inject.ConfigProperty;%0Aimport org.jboss.arquillian.container.test.api.Deployment;%0Aimport org.jboss.arquillian.container.test.api.ShouldThrowException;%0Aimport org.jboss.arquillian.testng.Arquillian;%0Aimport org.jboss.shrinkwrap.api.ShrinkWrap;%0Aimport org.jboss.shrinkwrap.api.asset.EmptyAsset;%0Aimport org.jboss.shrinkwrap.api.asset.StringAsset;%0Aimport org.jboss.shrinkwrap.api.spec.JavaArchive;%0Aimport org.jboss.shrinkwrap.api.spec.WebArchive;%0Aimport org.testng.annotations.Test;%0A%0A/**%0A * Verify that injectng a native value also has a valid converter which can handle the configured string.%0A *%0A * @author %3Ca href=%22mailto:struberg@apache.org%22%3EMark Struberg%3C/a%3E%0A */%0Apublic class WrongConverterOnInstanceInjectionTest extends Arquillian %7B%0A%0A    @ShouldThrowException(DeploymentException.class)%0A    @Deployment%0A    public static WebArchive deploy() %7B%0A        JavaArchive testJar = ShrinkWrap%0A                .create(JavaArchive.class, %22wrongConverterOnInstanceInjectionTest.jar%22)%0A                .addClass(ConfigOwner.class)%0A                .addAsManifestResource(EmptyAsset.INSTANCE, %22beans.xml%22)%0A                .addAsManifestResource(new StringAsset(%22my.long.value=xxxxx%22), %22microprofile-config.properties%22)%0A                .as(JavaArchive.class);%0A%0A        WebArchive war = ShrinkWrap%0A                .create(WebArchive.class, %22wrongConverterOnInstanceInjectionTest.war%22)%0A                .addAsLibrary(testJar);%0A        return war;%0A    %7D%0A%0A    @Test%0A    public void test() %7B%0A    %7D%0A%0A%0A    @RequestScoped%0A    public static class ConfigOwner %7B%0A%0A%0A        @Inject%0A        @ConfigProperty(name=%22my.long.value%22)%0A        private Long configValue;%0A    %7D%0A%7D%0A

add test to verify detection of wrong config format