Author: scabanovich
Date: 2010-04-23 08:53:33 -0400 (Fri, 23 Apr 2010)
New Revision: 21634
Added:
trunk/esb/tests/org.jboss.tools.esb.validator.test/.classpath
trunk/esb/tests/org.jboss.tools.esb.validator.test/.project
trunk/esb/tests/org.jboss.tools.esb.validator.test/META-INF/
trunk/esb/tests/org.jboss.tools.esb.validator.test/META-INF/MANIFEST.MF
trunk/esb/tests/org.jboss.tools.esb.validator.test/build.properties
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.classpath
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.project
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.eclipse.jdt.core.prefs
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.eclipse.wst.common.component
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.jboss.tools.esb.project.core.prefs
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/build/
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/build/classes/
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/esbcontent/
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/esbcontent/META-INF/
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/esbcontent/META-INF/jboss-esb-01.xml
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/esbcontent/META-INF/jboss-esb.xml
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/esbcontent/lib/
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/src/
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBTest.java
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBValidatorAllTests.java
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBValidatorTestSetup.java
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBValidatorTestSuite.java
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ValidationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6085
Share project "org.jboss.tools.esb.validator.test" into
"https://svn.jboss.org/repos/jbosstools"
Added: trunk/esb/tests/org.jboss.tools.esb.validator.test/.classpath
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.validator.test/.classpath
(rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.validator.test/.classpath 2010-04-23 12:53:33 UTC
(rev 21634)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/esb/tests/org.jboss.tools.esb.validator.test/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/esb/tests/org.jboss.tools.esb.validator.test/.project
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.validator.test/.project
(rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.validator.test/.project 2010-04-23 12:53:33 UTC
(rev 21634)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.esb.validator.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/esb/tests/org.jboss.tools.esb.validator.test/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/esb/tests/org.jboss.tools.esb.validator.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.validator.test/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.validator.test/META-INF/MANIFEST.MF 2010-04-23
12:53:33 UTC (rev 21634)
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Contexts and Dependency Injection Test
+Bundle-SymbolicName: org.jboss.tools.esb.validator.test
+Bundle-Version: 1.0.0
+Bundle-Vendor: JBoss by Red Hat
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.jboss.tools.esb.core,
+ org.jboss.tools.esb.project.core,
+ org.jboss.tools.esb.validator,
+ org.jboss.tools.tests,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.junit,
+ org.jboss.tools.common,
+ org.eclipse.ui,
+ org.eclipse.jdt.core,
+ org.jboss.tools.common.model.ui,
+ org.eclipse.ltk.core.refactoring;bundle-version="3.5.0"
+Export-Package: org.jboss.tools.esb.validator.test
+Bundle-ClassPath: esb-validator-test.jar
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.validator.test/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/esb/tests/org.jboss.tools.esb.validator.test/build.properties
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.validator.test/build.properties
(rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.validator.test/build.properties 2010-04-23
12:53:33 UTC (rev 21634)
@@ -0,0 +1,6 @@
+source.. = src/
+output.esb-validator-test.jar = bin/
+bin.includes = META-INF/,\
+ esb-validator-test.jar,\
+ projects/
+source.esb-validator-test.jar = src/
Property changes on: trunk/esb/tests/org.jboss.tools.esb.validator.test/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.classpath
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.classpath
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.classpath 2010-04-23
12:53:33 UTC (rev 21634)
@@ -0,0 +1,16 @@
+<?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/jre1.6.0_04">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con"
path="org.jboss.esb.runtime.classpath/server.supplied/JBoss 4.2 Runtime"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss
4.2 Runtime">
+ <attributes>
+ <attribute name="owner.project.facets"
value="jst.jboss.esb"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.project
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.project
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.project 2010-04-23
12:53:33 UTC (rev 21634)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>esbTest</name>
+ <comment></comment>
+ <projects>
+ <project>esbTest</project>
+ </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/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.eclipse.jdt.core.prefs 2010-04-23
12:53:33 UTC (rev 21634)
@@ -0,0 +1,7 @@
+#Fri Apr 23 14:26:32 MSD 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.eclipse.wst.common.component
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.eclipse.wst.common.component
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.eclipse.wst.common.component 2010-04-23
12:53:33 UTC (rev 21634)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="esbTest">
+<wb-resource deploy-path="/" source-path="/esbcontent"/>
+<dependent-module deploy-path="/"
handle="module:/org.jboss.ide.eclipse.as.wtp.core.vcf.outputFolders/">
+<dependency-type>consumes</dependency-type>
+</dependent-module>
+<property name="java-output-path" value="build/classes"/>
+</wb-module>
+</project-modules>
Added:
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.eclipse.wst.common.project.facet.core.xml
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.eclipse.wst.common.project.facet.core.xml 2010-04-23
12:53:33 UTC (rev 21634)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 4.2 Runtime"/>
+ <fixed facet="jst.java"/>
+ <fixed facet="jst.jboss.esb"/>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="jst.jboss.esb" version="4.7"/>
+</faceted-project>
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.jboss.tools.esb.project.core.prefs
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.jboss.tools.esb.project.core.prefs
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.jboss.tools.esb.project.core.prefs 2010-04-23
12:53:33 UTC (rev 21634)
@@ -0,0 +1,3 @@
+#Fri Apr 23 14:26:32 MSD 2010
+eclipse.preferences.version=1
+jboss.esb.project.project.version=2.0
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/.settings/org.jboss.tools.esb.project.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/esbcontent/META-INF/jboss-esb-01.xml
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/esbcontent/META-INF/jboss-esb-01.xml
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/esbcontent/META-INF/jboss-esb-01.xml 2010-04-23
12:53:33 UTC (rev 21634)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<jbossesb parameterReloadSecs="5"
+
xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc...
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trun...
http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schem...
+ <providers>
+ <fs-provider name="fsProvider">
+ <fs-bus busid="fsChannel"/>
+ </fs-provider>
+ </providers>
+ <services>
+ <service category="c1" description="d1" name="s1">
+ <listeners>
+ <ftp-listener busidref="fsChannel" name="ftpListener"/>
+ </listeners>
+ </service>
+ </services>
+</jbossesb>
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/esbcontent/META-INF/jboss-esb-01.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/esbcontent/META-INF/jboss-esb.xml
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/esbcontent/META-INF/jboss-esb.xml
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/esbcontent/META-INF/jboss-esb.xml 2010-04-23
12:53:33 UTC (rev 21634)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<jbossesb parameterReloadSecs="5"
+
xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc...
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trun...
http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schem...
+ <providers>
+ <fs-provider name="fsProvider">
+ <fs-bus busid="fsChannel"/>
+ </fs-provider>
+ <fs-provider name="ftpProvider">
+ <fs-bus busid="ftpChannel"/>
+ </fs-provider>
+ </providers>
+ <services>
+ <service category="c1" description="d1" name="s1">
+ <listeners>
+ <ftp-listener busidref="ftpChannel" name="ftpListener"/>
+ </listeners>
+ </service>
+ </services>
+</jbossesb>
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.validator.test/projects/esbTest/esbcontent/META-INF/jboss-esb.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBTest.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBTest.java
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBTest.java 2010-04-23
12:53:33 UTC (rev 21634)
@@ -0,0 +1,91 @@
+package org.jboss.tools.esb.validator.test;
+
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.common.text.ITextSourceReference;
+import org.jboss.tools.esb.core.facet.IJBossESBFacetDataModelProperties;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
+import org.osgi.framework.Bundle;
+
+public class ESBTest extends TestCase {
+ protected static String PLUGIN_ID = "org.jboss.tools.esb.validator.test";
+ protected static String PROJECT_NAME = "esbTest";
+ protected static String PROJECT_PATH = "/projects/esbTest";
+
+ protected static String WEB_CONTENT_SUFFIX = "/esbcontent";
+
+ protected IProject project;
+
+ public ESBTest() {
+ project = getTestProject();
+ }
+
+ public IProject getTestProject() {
+ if(project==null) {
+ try {
+ project = findTestProject();
+ if(project==null || !project.exists()) {
+ project = importPreparedProject("/");
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Can't import ESB test project: " + e.getMessage());
+ }
+ }
+ return project;
+ }
+
+ public static IProject findTestProject() {
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+ }
+
+ public static IProject importPreparedProject(String packPath) throws Exception {
+ Bundle b = Platform.getBundle(PLUGIN_ID);
+ boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+ if(project==null || !project.exists()) {
+ project = ResourcesUtils.importProject(b, PROJECT_PATH);
+ }
+ try {
+ project.setPersistentProperty(IJBossESBFacetDataModelProperties.QNAME_ESB_CONTENT_FOLDER,
"esbcontent");
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ ResourcesUtils.setBuildAutomatically(saveAutoBuild);
+ return project;
+ }
+
+
+ public static void assertLocationEquals(Set<? extends ITextSourceReference>
references, int startPosition, int length) {
+ for (ITextSourceReference reference : references) {
+ if(reference.getStartPosition()==startPosition) {
+ assertLocationEquals(reference, startPosition, length);
+ return;
+ }
+ }
+ StringBuffer message = new StringBuffer("Location [start
positopn=").append(startPosition).append(",
lengt=").append(length).append("] has not been found among ");
+ for (ITextSourceReference reference : references) {
+ message.append("[").append(reference.getStartPosition()).append(",
").append(reference.getLength()).append("] ");
+ }
+ fail(message.toString());
+ }
+
+ public static void assertLocationEquals(ITextSourceReference reference, int
startPosition, int length) {
+ assertEquals("Wrong start position", startPosition,
reference.getStartPosition());
+ assertEquals("Wrong length", length, reference.getLength());
+ }
+
+ public static void cleanProject(String _resourcePath) throws Exception {
+ }
+}
\ No newline at end of file
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBValidatorAllTests.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBValidatorAllTests.java
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBValidatorAllTests.java 2010-04-23
12:53:33 UTC (rev 21634)
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * 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.esb.validator.test;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jdt.internal.core.JavaModelManager;
+import org.jboss.tools.tests.AbstractPluginsLoadTest;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class ESBValidatorAllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("ESB Validator Tests");
+ suite.addTest(new ESBValidatorTestSetup(ESBValidatorTestSuite.suite()));
+
+ return new DisableJavaIndexingSetup(suite);
+ }
+
+// public class ESBPluginsLoadTest extends AbstractPluginsLoadTest {
+// public void testBundlesAreLoadedForSeamFeature(){
+// testBundlesAreLoadedFor("org.jboss.tools.cdi.feature");
+// }
+// }
+
+ public static class DisableJavaIndexingSetup extends TestSetup {
+
+ public DisableJavaIndexingSetup(Test test) {
+ super(test);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ JavaModelManager.getIndexManager().disable();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ JavaModelManager.getIndexManager().enable();
+ }
+ }
+}
\ No newline at end of file
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBValidatorAllTests.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBValidatorTestSetup.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBValidatorTestSetup.java
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBValidatorTestSetup.java 2010-04-23
12:53:33 UTC (rev 21634)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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.esb.validator.test;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IProject;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class ESBValidatorTestSetup extends TestSetup {
+
+ protected IProject project;
+
+ public ESBValidatorTestSetup(Test test) {
+ super(test);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ project = ESBTest.findTestProject();
+ }
+
+ @Override
+ protected 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/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBValidatorTestSetup.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBValidatorTestSuite.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBValidatorTestSuite.java
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBValidatorTestSuite.java 2010-04-23
12:53:33 UTC (rev 21634)
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * 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.esb.validator.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class ESBValidatorTestSuite extends TestSuite {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("ESB Validator Tests");
+ suite.addTestSuite(ValidationTest.class);
+ return suite;
+ }
+}
\ No newline at end of file
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ESBValidatorTestSuite.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ValidationTest.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ValidationTest.java
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ValidationTest.java 2010-04-23
12:53:33 UTC (rev 21634)
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * 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.esb.validator.test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.jboss.tools.esb.validator.ESBValidatorMessages;
+import org.jboss.tools.tests.AbstractResourceMarkerTest;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class ValidationTest extends ESBTest {
+
+ public void test0() throws Exception {
+ try {
+ Thread.sleep(2000);
+ } catch (InterruptedException e) {
+
+ }
+ }
+ /**
+ * FTP Listener cannot reference FS Channel.
+ *
+ * @throws Exception
+ */
+ public void testIncompatibleChannelReference() throws Exception {
+ IFile file = project.getFile("esbcontent/META-INF/jboss-esb-01.xml");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file,
AbstractResourceMarkerTest.MARKER_TYPE,
ESBValidatorMessages.LISTENER_REFERENCES_INCOMPATIBLE_CHANNEL, 13);
+ int markerNumbers = getMarkersNumber(file);
+ assertEquals("jboss-esb-01.xml should have one error marker.", markerNumbers,
1);
+ }
+
+ /**
+ *
+ * @throws Exception
+ */
+// public void testMultipleDisposeParameters() throws Exception {
+// IFile file =
project.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/multiParams/SpiderProducer_Broken.java");
+// AbstractResourceMarkerTest.assertMarkerIsCreated(file,
AbstractResourceMarkerTest.MARKER_TYPE,
ESBValidatorMessages.MULTIPLE_DISPOSING_PARAMETERS, 30, 30);
+// }
+
+ public static int getMarkersNumber(IResource resource) {
+ return AbstractResourceMarkerTest.getMarkersNumberByGroupName(resource, null);
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.validator.test/src/org/jboss/tools/esb/validator/test/ValidationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain