[jbosstools-commits] JBoss Tools SVN: r43454 - in trunk/as/tests/org.jboss.tools.as.test.core: src/org/jboss/tools/as/test/core/internal/utils and 3 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Wed Sep 5 21:07:36 EDT 2012


Author: dgolovin
Date: 2012-09-05 21:07:36 -0400 (Wed, 05 Sep 2012)
New Revision: 43454

Added:
   trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/internal/utils/classpath/
   trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/internal/utils/classpath/ASToolsInternalVariableInitializer.java
Modified:
   trunk/as/tests/org.jboss.tools.as.test.core/META-INF/MANIFEST.MF
   trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/internal/utils/ResourceUtils.java
   trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/ProjectRuntimeClasspathTest.java
   trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/publishing/DeploymentAssemblyArchivePathVarTest.java
   trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/publishing/DeploymentAssemblyFilesetReferenceTest.java
Log:
fix for compilation errors in as.test.core plugin
missing ASToolsInternalVariableInitializer.java added with fake implementation

Modified: trunk/as/tests/org.jboss.tools.as.test.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/tests/org.jboss.tools.as.test.core/META-INF/MANIFEST.MF	2012-09-06 01:03:18 UTC (rev 43453)
+++ trunk/as/tests/org.jboss.tools.as.test.core/META-INF/MANIFEST.MF	2012-09-06 01:07:36 UTC (rev 43454)
@@ -56,6 +56,7 @@
  org.eclipse.jst.jsf.core,
  org.eclipse.jpt.jpa.core,
  org.jboss.ide.eclipse.as.management.core;bundle-version="1.0.0",
- org.eclipse.equinox.security;bundle-version="1.1.1"
+ org.eclipse.equinox.security;bundle-version="1.1.1",
+ org.eclipse.jdt.junit.core;bundle-version="3.7.100"
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6

Modified: trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/internal/utils/ResourceUtils.java
===================================================================
--- trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/internal/utils/ResourceUtils.java	2012-09-06 01:03:18 UTC (rev 43453)
+++ trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/internal/utils/ResourceUtils.java	2012-09-06 01:07:36 UTC (rev 43454)
@@ -69,6 +69,13 @@
 		}
 	}
 	
+	/**
+	 * This this method forwards request to IWorkspaceRoot.getProject(String name) and it 
+	 * never returns null
+	 * @see IWorkspaceRoot.getProject(String name) 
+	 * @param name - name for the requested project
+	 * @return a handler for project with <code>name</code>
+	 */
 	public static IProject findProject(String name) {
 		return ResourcesPlugin.getWorkspace().getRoot().getProject(name);
 	}

Added: trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/internal/utils/classpath/ASToolsInternalVariableInitializer.java
===================================================================
--- trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/internal/utils/classpath/ASToolsInternalVariableInitializer.java	                        (rev 0)
+++ trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/internal/utils/classpath/ASToolsInternalVariableInitializer.java	2012-09-06 01:07:36 UTC (rev 43454)
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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
+ *
+ * Contributor:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.as.test.core.internal.utils.classpath;
+
+/**
+ * @author Rob Stryker
+ *
+ */
+public class ASToolsInternalVariableInitializer {
+
+	public static final String ASTOOLS_TEST_HOME_VAR = "JUNIT_HOME";
+
+	public static void ensureFoldersCreated() {
+		// TODO Auto-generated method stub
+	}
+
+}


Property changes on: trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/internal/utils/classpath/ASToolsInternalVariableInitializer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Modified: trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/ProjectRuntimeClasspathTest.java
===================================================================
--- trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/ProjectRuntimeClasspathTest.java	2012-09-06 01:03:18 UTC (rev 43453)
+++ trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/ProjectRuntimeClasspathTest.java	2012-09-06 01:07:36 UTC (rev 43454)
@@ -88,7 +88,7 @@
 	protected IProject createSingleProject(IDataModel dm, String name) throws Exception {
 		OperationTestCase.runAndVerify(dm);
 		IProject p = ResourceUtils.findProject(name);
-		if( p == null || !p.exists())
+		if( !p.exists())
 			fail();
 		return p;
 	}

Modified: trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/publishing/DeploymentAssemblyArchivePathVarTest.java
===================================================================
--- trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/publishing/DeploymentAssemblyArchivePathVarTest.java	2012-09-06 01:03:18 UTC (rev 43453)
+++ trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/publishing/DeploymentAssemblyArchivePathVarTest.java	2012-09-06 01:07:36 UTC (rev 43454)
@@ -82,7 +82,7 @@
 	protected IProject createSingleProject(IDataModel dm, String name) throws Exception {
 		OperationTestCase.runAndVerify(dm);
 		IProject p = ResourceUtils.findProject(name);
-		if( p == null || !p.exists())
+		if(!p.exists())
 			fail();
 		return p;
 	}
@@ -100,8 +100,7 @@
 	
 	protected IVirtualReference createArchiveReference(IVirtualComponent vc) throws Exception {
 		ASToolsInternalVariableInitializer.ensureFoldersCreated();
-		String varName = ASToolsInternalVariableInitializer.ASTOOLS_TEST_HOME_VAR;
-		IPath path = new Path(varName + "/junit.jar"); //$NON-NLS-1$
+		IPath path = new Path(ASToolsInternalVariableInitializer.ASTOOLS_TEST_HOME_VAR + "/junit.jar"); //$NON-NLS-1$
 		IVirtualReference ref = ComponentReferenceUtils.createPathArchiveReference(vc, path, jarFolder, jarName);
 		return ref;
 	}

Modified: trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/publishing/DeploymentAssemblyFilesetReferenceTest.java
===================================================================
--- trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/publishing/DeploymentAssemblyFilesetReferenceTest.java	2012-09-06 01:03:18 UTC (rev 43453)
+++ trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/publishing/DeploymentAssemblyFilesetReferenceTest.java	2012-09-06 01:07:36 UTC (rev 43454)
@@ -58,7 +58,7 @@
 				null, null, JavaEEFacetConstants.EAR_5, false);
 		OperationTestCase.runAndVerify(dm);
 		IProject p = ResourceUtils.findProject(MY_PROJECT_NAME);
-		if( p == null || !p.exists())
+		if(!p.exists())
 			fail();
 		
 		p.getFolder("folder1").create(true, true, new NullProgressMonitor());



More information about the jbosstools-commits mailing list