/*
 * JBoss, Home of Professional Open Source
 * Copyright 2010, Red Hat, Inc., and individual contributors
 * by the @authors tag. See the copyright.txt in the distribution for a
 * full listing of individual contributors.
 *
 * Licensed 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.jboss.weld.tests.proxy.privateconstructor;

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.weld.tests.category.Integration;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;

@Category(Integration.class)
@RunWith(Arquillian.class)
@Ignore // WELD-687
public class ProxyConstructorTest {
    @Deployment
    public static Archive<?> deploy() {
        return ShrinkWrap.create(WebArchive.class, "test.war")
                .addPackage(ProxyConstructorTest.class.getPackage())
                .addAsWebResource(EmptyAsset.INSTANCE, "beans.xml")
                .addAsWebResource(EmptyAsset.INSTANCE, "classes/META-INF/org.jboss.weld.enableUnsafeProxies");
    }

    @Test
    public void testProxy(Foo foo) {
        Assert.assertEquals("ping", foo.ping());
    }
}

@@ -1,11 +1,10 @@
 /*
-%0D
 %0A * JBos
@@ -38,17 +38,16 @@
 n Source
-%0D
 %0A * Copy
@@ -100,17 +100,16 @@
 ributors
-%0D
 %0A * by t
@@ -172,17 +172,16 @@
 on for a
-%0D
 %0A * full
@@ -220,13 +220,11 @@
 ors.
-%0D
 %0A *
-%0D
 %0A * 
@@ -286,17 +286,16 @@
 cense%22);
-%0D
 %0A * you 
@@ -354,17 +354,16 @@
 License.
-%0D
 %0A * You 
@@ -397,17 +397,16 @@
 cense at
-%0D
 %0A * http
@@ -443,17 +443,16 @@
 ENSE-2.0
-%0D
 %0A * Unle
@@ -514,17 +514,16 @@
 software
-%0D
 %0A * dist
@@ -583,17 +583,16 @@
 %22 BASIS,
-%0D
 %0A * WITH
@@ -659,17 +659,16 @@
 implied.
-%0D
 %0A * See 
@@ -730,17 +730,16 @@
 ions and
-%0D
 %0A * limi
@@ -768,14 +768,12 @@
 nse.
-%0D
 %0A */
-%0D
 %0Apac
@@ -823,19 +823,17 @@
 tructor;
-%0D%0A%0D
+%0A
 %0Aimport 
@@ -883,17 +883,16 @@
 loyment;
-%0D
 %0Aimport 
@@ -929,17 +929,16 @@
 uillian;
-%0D
 %0Aimport 
@@ -962,33 +962,32 @@
 rap.api.Archive;
-%0D
 %0Aimport org.jbos
@@ -1014,17 +1014,16 @@
 inkWrap;
-%0D
 %0Aimport 
@@ -1064,17 +1064,16 @@
 tyAsset;
-%0D
 %0Aimport 
@@ -1113,17 +1113,16 @@
 Archive;
-%0D
 %0Aimport 
@@ -1163,17 +1163,16 @@
 gration;
-%0D
 %0Aimport 
@@ -1192,35 +1192,8 @@
 ert;
-%0D%0Aimport org.junit.Ignore;%0D
 %0Aimp
@@ -1211,17 +1211,16 @@
 it.Test;
-%0D
 %0Aimport 
@@ -1262,17 +1262,16 @@
 ategory;
-%0D
 %0Aimport 
@@ -1295,19 +1295,17 @@
 RunWith;
-%0D%0A%0D
+%0A
 %0A@Catego
@@ -1325,17 +1325,16 @@
 n.class)
-%0D
 %0A@RunWit
@@ -1356,30 +1356,8 @@
 ass)
-%0D%0A@Ignore // WELD-687%0D
 %0Apub
@@ -1388,17 +1388,16 @@
 orTest %7B
-%0D
 %0A    @De
@@ -1404,17 +1404,16 @@
 ployment
-%0D
 %0A    pub
@@ -1444,17 +1444,16 @@
 ploy() %7B
-%0D
 %0A       
@@ -1507,17 +1507,16 @@
 st.war%22)
-%0D
 %0A       
@@ -1576,17 +1576,16 @@
 ckage())
-%0D
 %0A       
@@ -1644,17 +1644,16 @@
 ns.xml%22)
-%0D
 %0A       
@@ -1758,19 +1758,140 @@
 es%22)
-;%0D
+%0A                .addAsManifestResource(EmptyAsset.INSTANCE, %22org.jboss.weld.enableUnsafeProxies%22); // workaround for SW bug?
 %0A    %7D
-%0D%0A%0D
+%0A
 %0A   
@@ -1896,17 +1896,16 @@
    @Test
-%0D
 %0A    pub
@@ -1933,17 +1933,16 @@
 o foo) %7B
-%0D
 %0A       
@@ -1986,16 +1986,13 @@
 ());
-%0D
 %0A    %7D
-%0D
 %0A%7D
-%0D
 %0A

Enable WELD-687 test.