Author: akazakov
Date: 2009-12-24 11:16:10 -0500 (Thu, 24 Dec 2009)
New Revision: 19575
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DefinitionTest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/core/test/CATest.java
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/normal/scope/NormalScopedBeanWithInjectionPoint.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/reference/ambiguous/AmbiguousInjectionPoint.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/reference/unresolved/UnsatisfiedInjectionPoint.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF
Log:
https://jira.jboss.org/jira/browse/JBIDE-5383
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF 2009-12-24 16:04:23
UTC (rev 19574)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF 2009-12-24 16:16:10
UTC (rev 19575)
@@ -11,3 +11,5 @@
org.junit,
org.jboss.tools.cdi.core,
org.jboss.tools.common
+Export-Package: org.jboss.tools.cdi.core.test,
+ org.jboss.tools.cdi.core.test.tck
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath 2009-12-24
16:04:23 UTC (rev 19574)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath 2009-12-24
16:16:10 UTC (rev 19575)
@@ -8,7 +8,7 @@
<attribute name="owner.project.facets" value="jst.web"/>
</attributes>
</classpathentry>
- <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.5.0_11">
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="jst.java"/>
</attributes>
Deleted:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/normal/scope/NormalScopedBeanWithInjectionPoint.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/normal/scope/NormalScopedBeanWithInjectionPoint.java 2009-12-24
16:04:23 UTC (rev 19574)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/normal/scope/NormalScopedBeanWithInjectionPoint.java 2009-12-24
16:16:10 UTC (rev 19575)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, 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.jsr299.tck.tests.lookup.injectionpoint.broken.normal.scope;
-
-import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.jsr299.tck.DeploymentFailure;
-import org.jboss.test.audit.annotations.SpecAssertion;
-import org.jboss.test.audit.annotations.SpecVersion;
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
-import org.testng.annotations.Test;
-
-@Artifact
-(a)ExpectedDeploymentException(DeploymentFailure.class)
-@SpecVersion(spec="cdi", version="20091101")
-public class NormalScopedBeanWithInjectionPoint extends AbstractJSR299Test
-{
-
- @Test(groups = { "injectionPoint"})
- @SpecAssertion(section = "5.5.7", id = "f")
- public void testSessionScopedBeanWithInjectionPoint()
- {
- assert false;
- }
-
-}
Deleted:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/reference/ambiguous/AmbiguousInjectionPoint.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/reference/ambiguous/AmbiguousInjectionPoint.java 2009-12-24
16:04:23 UTC (rev 19574)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/reference/ambiguous/AmbiguousInjectionPoint.java 2009-12-24
16:16:10 UTC (rev 19575)
@@ -1,65 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.reference.ambiguous;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Member;
-import java.lang.reflect.Type;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.inject.spi.Annotated;
-import javax.enterprise.inject.spi.AnnotatedField;
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.jboss.jsr299.tck.literals.AnyLiteral;
-import org.jboss.jsr299.tck.literals.DefaultLiteral;
-
-public class AmbiguousInjectionPoint implements InjectionPoint
-{
- private final Bean<SimpleBean> bean;
- private final Set<Annotation> bindings = new HashSet<Annotation>();
-
- public AmbiguousInjectionPoint(Bean<SimpleBean> bean)
- {
- this.bean = bean;
- bindings.add(new DefaultLiteral());
- bindings.add(new AnyLiteral());
- }
-
- public Annotated getAnnotated()
- {
- return new AnnotatedInjectionField(this);
- }
-
- public Bean<?> getBean()
- {
- return bean;
- }
-
- public Set<Annotation> getQualifiers()
- {
- return bindings;
- }
-
- @SuppressWarnings("unchecked")
- public Member getMember()
- {
- return ((AnnotatedField<SimpleBean>)getAnnotated()).getJavaMember();
- }
-
- public Type getType()
- {
- return InjectedBean.class;
- }
-
- public boolean isDelegate()
- {
- return false;
- }
-
- public boolean isTransient()
- {
- return false;
- }
-
-}
Deleted:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/reference/unresolved/UnsatisfiedInjectionPoint.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/reference/unresolved/UnsatisfiedInjectionPoint.java 2009-12-24
16:04:23 UTC (rev 19574)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/lookup/injectionpoint/broken/reference/unresolved/UnsatisfiedInjectionPoint.java 2009-12-24
16:16:10 UTC (rev 19575)
@@ -1,66 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.reference.unresolved;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Member;
-import java.lang.reflect.Type;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.inject.spi.Annotated;
-import javax.enterprise.inject.spi.AnnotatedField;
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.jboss.jsr299.tck.literals.AnyLiteral;
-import org.jboss.jsr299.tck.literals.DefaultLiteral;
-
-public class UnsatisfiedInjectionPoint implements InjectionPoint
-{
-
- private final Bean<SimpleBean> bean;
- private final Set<Annotation> bindings = new HashSet<Annotation>();
-
- public UnsatisfiedInjectionPoint(Bean<SimpleBean> beanWithInjectionPoint)
- {
- this.bean = beanWithInjectionPoint;
- bindings.add(new DefaultLiteral());
- bindings.add(new AnyLiteral());
- }
-
- public Annotated getAnnotated()
- {
- return new AnnotatedInjectionField(this);
- }
-
- public Bean<?> getBean()
- {
- return bean;
- }
-
- public Set<Annotation> getQualifiers()
- {
- return bindings;
- }
-
- @SuppressWarnings("unchecked")
- public Member getMember()
- {
- return ((AnnotatedField<SimpleBean>)getAnnotated()).getJavaMember();
- }
-
- public Type getType()
- {
- return InjectedBean.class;
- }
-
- public boolean isDelegate()
- {
- return false;
- }
-
- public boolean isTransient()
- {
- return false;
- }
-
-}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2009-12-24
16:04:23 UTC (rev 19574)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2009-12-24
16:16:10 UTC (rev 19575)
@@ -13,7 +13,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.jboss.tools.cdi.core.test.tck.TCKTest;
+import org.jboss.tools.cdi.core.test.tck.DefinitionTest;
import org.jboss.tools.tests.AbstractPluginsLoadTest;
/**
@@ -23,7 +23,7 @@
public static Test suite() {
TestSuite suite = new TestSuite("CDI Core Tests");
- suite.addTestSuite(TCKTest.class);
+ suite.addTestSuite(DefinitionTest.class);
return suite;
}
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DefinitionTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DefinitionTest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DefinitionTest.java 2009-12-24
16:16:10 UTC (rev 19575)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core.test.tck;
+
+import org.eclipse.core.resources.IProject;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class DefinitionTest extends TCKTest {
+
+ protected void setUp() throws Exception {
+ IProject p = importPreparedProject("/definition/qualifier");
+ }
+
+ public void test1() {
+
+ }
+
+ protected void tearDown() throws Exception {
+ cleanProject("/definition/qualifier");
+ }
+}
\ No newline at end of file
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DefinitionTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java 2009-12-24
16:04:23 UTC (rev 19574)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java 2009-12-24
16:16:10 UTC (rev 19575)
@@ -3,6 +3,8 @@
import java.io.File;
import java.io.FileFilter;
+import junit.framework.TestCase;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
@@ -10,8 +12,6 @@
import org.jboss.tools.test.util.ResourcesUtils;
import org.osgi.framework.Bundle;
-import junit.framework.TestCase;
-
public class TCKTest extends TestCase {
protected static String PLUGIN_ID = "org.jboss.tools.cdi.core.test";
protected static String PROJECT_PATH = "/projects/tck";
@@ -27,8 +27,6 @@
protected static String TCK_RESOURCES_PREFIX = "/resources/tck";
- public TCKTest() {}
-
public IProject importPreparedProject(String packPath) throws Exception {
Bundle b = Platform.getBundle(PLUGIN_ID);
String projectPath = FileLocator.resolve(b.getEntry(PROJECT_PATH)).getFile();
@@ -100,16 +98,4 @@
FileUtil.remove(fs[i]);
}
}
-
- protected void setUp() throws Exception {
- IProject p = importPreparedProject("/definition/qualifier");
- }
-
- public void test1() {
-
- }
-
- protected void tearDown() throws Exception {
- cleanProject("/definition/qualifier");
- }
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF 2009-12-24 16:04:23
UTC (rev 19574)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF 2009-12-24 16:16:10
UTC (rev 19575)
@@ -7,4 +7,6 @@
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.junit,
org.jboss.tools.cdi.ui,
- org.jboss.tools.tests
+ org.jboss.tools.tests,
+ org.jboss.tools.cdi.core.test,
+ org.eclipse.core.resources
Added:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/core/test/CATest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/core/test/CATest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/core/test/CATest.java 2009-12-24
16:16:10 UTC (rev 19575)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core.test;
+
+import org.eclipse.core.resources.IProject;
+import org.jboss.tools.cdi.core.test.tck.TCKTest;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class CATest extends TCKTest {
+
+ protected void setUp() throws Exception {
+ IProject p = importPreparedProject("/definition/qualifier");
+ }
+
+ public void test1() {
+
+ }
+
+ protected void tearDown() throws Exception {
+ cleanProject("/definition/qualifier");
+ }
+}
\ No newline at end of file
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/core/test/CATest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain