Skip to content

Commit

Permalink
[WELD-1075]; port .zip tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
alesj authored and jharting committed Mar 9, 2012
1 parent 0381467 commit ad57d86
Show file tree
Hide file tree
Showing 9 changed files with 117 additions and 0 deletions.
@@ -0,0 +1,5 @@
package org.jboss.weld.tests.resolution.weld1075;


public abstract class AbstractClass1<T1, T2, T3> implements Interface2<T1, T2> {
}
@@ -0,0 +1,5 @@
package org.jboss.weld.tests.resolution.weld1075;


public abstract class AbstractClass2<T1, T2, T3> extends AbstractClass1<T1, T2, T3> {
}
@@ -0,0 +1,8 @@
package org.jboss.weld.tests.resolution.weld1075;


import java.util.UUID;


public class ConcreteClass1 extends AbstractClass2<String, Integer, UUID> {
}
@@ -0,0 +1,5 @@
package org.jboss.weld.tests.resolution.weld1075;


public class ConcreteClass2 extends AbstractClass2<String, Double, Double> {
}
@@ -0,0 +1,8 @@
package org.jboss.weld.tests.resolution.weld1075;


import java.util.UUID;


public class ConcreteClass3 implements Interface1<UUID, String> {
}
@@ -0,0 +1,29 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2012, 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.resolution.weld1075;

import javax.inject.Inject;
import java.util.UUID;

/**
* @author <a href="mailto:ales.justin@jboss.org">Ales Justin</a>
*/
public class Holder {
@Inject
Interface1<UUID, String> dependency;
}
@@ -0,0 +1,5 @@
package org.jboss.weld.tests.resolution.weld1075;


public interface Interface1<T1, T2> {
}
@@ -0,0 +1,5 @@
package org.jboss.weld.tests.resolution.weld1075;


public interface Interface2<T1, T2> extends Interface1<T1, T2> {
}
@@ -0,0 +1,47 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2012, 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.resolution.weld1075;


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.BeanArchive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.assertNotNull;

/**
* @author Sebastian Graca
* @author Ales Justin
*/
@RunWith(Arquillian.class)
public class ResolutionTest {
@Deployment
public static Archive<?> createDeployment() {
return ShrinkWrap.create(BeanArchive.class).addPackage(ResolutionTest.class.getPackage());
}

@Test
public void shouldResolveDependency(Holder holder) {
assertNotNull(holder);
assertNotNull(holder.dependency);
}
}

0 comments on commit ad57d86

Please sign in to comment.