Author: akazakov
Date: 2010-12-08 10:20:54 -0500 (Wed, 08 Dec 2010)
New Revision: 27234
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.project
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.settings/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.settings/org.eclipse.wst.common.component
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/build/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/build/classes/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/build/classes/META-INF/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/build/classes/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/ejbModule/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/ejbModule/META-INF/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/ejbModule/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.project
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/.jsdtscope
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.common.component
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/WebContent/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/WebContent/META-INF/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/WebContent/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/WebContent/WEB-INF/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/WebContent/WEB-INF/lib/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/build/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/build/classes/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/src/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/project/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/project/EnableCDISupportForJarTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/project/EnableCDISupportForWarTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
Log:
https://jira.jboss.org/browse/JBIDE-7803
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.classpath
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.classpath 2010-12-08
15:20:54 UTC (rev 27234)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="ejbModule"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_20">
+ <attributes>
+ <attribute name="owner.project.facets" value="java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con"
path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss
6.0 Runtime CR1">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.ejb"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.project
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.project
(rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.project 2010-12-08
15:20:54 UTC (rev 27234)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jarproject</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.settings/org.eclipse.wst.common.component
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.settings/org.eclipse.wst.common.component
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.settings/org.eclipse.wst.common.component 2010-12-08
15:20:54 UTC (rev 27234)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="jarproject">
+ <wb-resource deploy-path="/"
source-path="/ejbModule"/>
+ <property name="java-output-path"
value="/jarproject/build/classes"/>
+ </wb-module>
+</project-modules>
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.settings/org.eclipse.wst.common.project.facet.core.xml
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.settings/org.eclipse.wst.common.project.facet.core.xml 2010-12-08
15:20:54 UTC (rev 27234)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 6.0 Runtime CR1"/>
+ <fixed facet="jst.ejb"/>
+ <fixed facet="java"/>
+ <installed facet="java" version="1.6"/>
+ <installed facet="jst.ejb" version="3.1"/>
+</faceted-project>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/build/classes/META-INF/MANIFEST.MF
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/build/classes/META-INF/MANIFEST.MF
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/build/classes/META-INF/MANIFEST.MF 2010-12-08
15:20:54 UTC (rev 27234)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/build/classes/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/ejbModule/META-INF/MANIFEST.MF
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/ejbModule/META-INF/MANIFEST.MF
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/ejbModule/META-INF/MANIFEST.MF 2010-12-08
15:20:54 UTC (rev 27234)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/jarproject/ejbModule/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.classpath
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.classpath 2010-12-08
15:20:54 UTC (rev 27234)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_20">
+ <attributes>
+ <attribute name="owner.project.facets" value="java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con"
path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss
6.0 Runtime CR1">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.web"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.project
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.project
(rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.project 2010-12-08
15:20:54 UTC (rev 27234)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>warproject</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/.jsdtscope
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/.jsdtscope
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/.jsdtscope 2010-12-08
15:20:54 UTC (rev 27234)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebContent"/>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.common.component
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.common.component
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.common.component 2010-12-08
15:20:54 UTC (rev 27234)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="warproject">
+ <wb-resource deploy-path="/"
source-path="/WebContent"/>
+ <wb-resource deploy-path="/WEB-INF/classes"
source-path="/src"/>
+ <property name="java-output-path"
value="/webproject/build/classes"/>
+ <property name="context-root" value="warproject"/>
+ </wb-module>
+</project-modules>
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.common.project.facet.core.xml
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.common.project.facet.core.xml 2010-12-08
15:20:54 UTC (rev 27234)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 6.0 Runtime CR1"/>
+ <fixed facet="wst.jsdt.web"/>
+ <fixed facet="java"/>
+ <fixed facet="jst.web"/>
+ <installed facet="java" version="1.6"/>
+ <installed facet="jst.web" version="3.0"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.jsdt.ui.superType.container
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.jsdt.ui.superType.container 2010-12-08
15:20:54 UTC (rev 27234)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.jsdt.ui.superType.name
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/.settings/org.eclipse.wst.jsdt.ui.superType.name 2010-12-08
15:20:54 UTC (rev 27234)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/WebContent/META-INF/MANIFEST.MF
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/WebContent/META-INF/MANIFEST.MF
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/WebContent/META-INF/MANIFEST.MF 2010-12-08
15:20:54 UTC (rev 27234)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/warproject/WebContent/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
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 2010-12-08
14:58:05 UTC (rev 27233)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2010-12-08
15:20:54 UTC (rev 27234)
@@ -15,6 +15,8 @@
import org.eclipse.jdt.internal.core.JavaModelManager;
import org.jboss.tools.cdi.core.test.ca.BeansXmlCATest;
+import org.jboss.tools.cdi.core.test.project.EnableCDISupportForJarTest;
+import org.jboss.tools.cdi.core.test.project.EnableCDISupportForWarTest;
import org.jboss.tools.cdi.core.test.tck.AssignabilityOfRawAndParameterizedTypesTest;
import org.jboss.tools.cdi.core.test.tck.BeanDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.BeanSpecializationTest;
@@ -52,8 +54,7 @@
public static Test suite() {
// it could be done here because it is not needed to be enabled back
JavaModelManager.getIndexManager().disable();
-
-
+
TestSuite suiteAll = new TestSuite("CDI Core Tests");
TestSuite suite = new TestSuite("TCK Tests");
@@ -87,9 +88,11 @@
suite.addTestSuite(AnnotationsValidationTest.class);
suite.addTestSuite(CoreValidationTest.class);
suite.addTestSuite(SelectedAlternativeTest.class);
-
+
suiteAll.addTestSuite(BeansXMLTest.class);
suiteAll.addTestSuite(DependentProjectTest.class);
+ suiteAll.addTestSuite(EnableCDISupportForWarTest.class);
+ suiteAll.addTestSuite(EnableCDISupportForJarTest.class);
suiteAll.addTest(new CDICoreTestSetup(suite));
return suiteAll;
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/project/EnableCDISupportForJarTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/project/EnableCDISupportForJarTest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/project/EnableCDISupportForJarTest.java 2010-12-08
15:20:54 UTC (rev 27234)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.project;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class EnableCDISupportForJarTest extends EnableCDISupportForWarTest {
+
+ @Override
+ public void setUp() throws Exception {
+ project = ResourcesUtils.importProject(PLUGIN_ID, "/projects/jarproject");
+ project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ JobUtils.waitForIdle();
+ }
+
+ @Override
+ protected String getBeansXmlPath() {
+ return "ejbModule/META-INF/beans.xml";
+ }
+}
\ 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/project/EnableCDISupportForJarTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/project/EnableCDISupportForWarTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/project/EnableCDISupportForWarTest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/project/EnableCDISupportForWarTest.java 2010-12-08
15:20:54 UTC (rev 27234)
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.project;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.CDIUtil;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class EnableCDISupportForWarTest extends TestCase {
+
+ protected static String PLUGIN_ID = "org.jboss.tools.cdi.core.test";
+ protected IProject project = null;
+
+ public void setUp() throws Exception {
+ project = ResourcesUtils.importProject(PLUGIN_ID, "/projects/warproject");
+ project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ JobUtils.waitForIdle();
+ }
+
+ protected String getBeansXmlPath() {
+ return "WebContent/WEB-INF/beans.xml";
+ }
+
+ public void testEnableCDISupport() {
+ CDIUtil.enableCDI(project, true, new NullProgressMonitor());
+ JobUtils.waitForIdle();
+ assertNotNull("CDI is not enabled", CDICorePlugin.getCDI(project, false));
+
+ IFile beansXml = project.getFile(new Path(getBeansXmlPath()));
+ assertNotNull("Can't find beans.xml", beansXml);
+ assertTrue("Can't find beans.xml", beansXml.isAccessible());
+
+ CDIUtil.disableCDI(project);
+ JobUtils.waitForIdle();
+ assertNull("CDI is enabled", CDICorePlugin.getCDI(project, false));
+ }
+
+ public void tearDown() throws Exception {
+ boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+ JobUtils.waitForIdle();
+ project.delete(true, true, null);
+ JobUtils.waitForIdle();
+ ResourcesUtils.setBuildAutomatically(saveAutoBuild);
+ }
+}
\ 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/project/EnableCDISupportForWarTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain