Author: jjankovi
Date: 2012-03-21 05:53:56 -0400 (Wed, 21 Mar 2012)
New Revision: 39687
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/Seam3TestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/SolderTestBase.java
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/Seam3TestBase.java
Log:
SolderTestBase class created + moving base classes no new package
Deleted:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/Seam3TestBase.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/Seam3TestBase.java 2012-03-21
09:51:45 UTC (rev 39686)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/Seam3TestBase.java 2012-03-21
09:53:56 UTC (rev 39687)
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * 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.seam3.bot.test;
-
-import java.io.IOException;
-import java.util.logging.Level;
-
-import org.jboss.tools.cdi.bot.test.CDITestBase;
-import org.jboss.tools.cdi.seam3.bot.test.util.LibraryHelper;
-import org.jboss.tools.cdi.seam3.bot.test.util.ProjectImportHelper;
-import org.jboss.tools.cdi.seam3.bot.test.util.SeamLibraries;
-import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite.SuiteClasses;
-
-@Require(clearProjects = true, perspective = "Java EE",
- server = @Server(state = ServerState.NotRunning,
- version = "6.0", operator = ">="))
-(a)RunWith(RequirementAwareSuite.class)
-@SuiteClasses({ CDISeam3AllBotTests.class })
-public class Seam3TestBase extends CDITestBase {
-
- private String projectName = "CDISeam3Project";
- private String packageName = "cdi.seam";
-
- protected final LibraryHelper libraryHelper = new LibraryHelper();
- protected final ProjectImportHelper projectImportHelper = new ProjectImportHelper();
-
- protected String getProjectName() {
- return projectName;
- }
-
- protected String getPackageName() {
- return packageName;
- }
-
- @Override
- public void prepareWorkspace() {
- projectImportHelper.importTestProject("/resources/projects/" +
getProjectName());
- }
-
- protected void addAndCheckLibrary(SeamLibraries library) {
- addLibrary(library.getName());
- checkLibrary(library.getName());
- }
-
- private void addLibrary(String libraryName) {
- try {
- libraryHelper.addLibraryIntoProject(getProjectName(), libraryName);
- LOGGER.info("Library: \"" + libraryName + "\" copied");
- util.waitForNonIgnoredJobs();
- libraryHelper.addLibraryToProjectsClassPath(getProjectName(), libraryName);
- LOGGER.info("Library: \"" + libraryName + "\" on class path
of project\"" + getProjectName() + "\"");
- } catch (IOException exc) {
- LOGGER.log(Level.SEVERE, "Error while adding " + libraryName + "
library into project");
- }
- }
-
- private void checkLibrary(String libraryName) {
- assertTrue(libraryHelper.isLibraryInProjectClassPath(getProjectName(),
libraryName));
- }
-
-}
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/Seam3TestBase.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/Seam3TestBase.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/Seam3TestBase.java 2012-03-21
09:53:56 UTC (rev 39687)
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2010-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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.cdi.seam3.bot.test.base;
+
+import java.io.IOException;
+import java.util.logging.Level;
+
+import org.jboss.tools.cdi.bot.test.CDITestBase;
+import org.jboss.tools.cdi.seam3.bot.test.CDISeam3AllBotTests;
+import org.jboss.tools.cdi.seam3.bot.test.util.LibraryHelper;
+import org.jboss.tools.cdi.seam3.bot.test.util.ProjectImportHelper;
+import org.jboss.tools.cdi.seam3.bot.test.util.SeamLibraries;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+@Require(clearProjects = true, perspective = "Java EE",
+ server = @Server(state = ServerState.NotRunning,
+ version = "6.0", operator = ">="))
+(a)RunWith(RequirementAwareSuite.class)
+@SuiteClasses({ CDISeam3AllBotTests.class })
+public class Seam3TestBase extends CDITestBase {
+
+ private String projectName = "CDISeam3Project";
+ private String packageName = "cdi.seam";
+
+ protected final LibraryHelper libraryHelper = new LibraryHelper();
+ protected final ProjectImportHelper projectImportHelper = new ProjectImportHelper();
+
+ protected String getProjectName() {
+ return projectName;
+ }
+
+ protected String getPackageName() {
+ return packageName;
+ }
+
+ @Override
+ public void prepareWorkspace() {
+ projectImportHelper.importTestProject("/resources/projects/" +
getProjectName(), projectName);
+ }
+
+ protected void addAndCheckLibraryInProject(String projectName, SeamLibraries library) {
+ addLibraryIntoProject(projectName, library.getName());
+ checkLibraryInProject(projectName, library.getName());
+ }
+
+ private void addLibraryIntoProject(String projectName, String libraryName) {
+ try {
+ libraryHelper.addLibraryIntoProject(projectName, libraryName);
+ LOGGER.info("Library: \"" + libraryName + "\" copied");
+ util.waitForNonIgnoredJobs();
+ libraryHelper.addLibraryToProjectsClassPath(projectName, libraryName);
+ LOGGER.info("Library: \"" + libraryName + "\" on class path
of project\"" + projectName + "\"");
+ } catch (IOException exc) {
+ LOGGER.log(Level.SEVERE, "Error while adding " + libraryName + "
library into project");
+ LOGGER.log(Level.SEVERE, exc.getMessage());
+ }
+ }
+
+ private void checkLibraryInProject(String projectName, String libraryName) {
+ assertTrue(libraryHelper.isLibraryInProjectClassPath(projectName, libraryName));
+ }
+
+}
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/SolderTestBase.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/SolderTestBase.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/SolderTestBase.java 2012-03-21
09:53:56 UTC (rev 39687)
@@ -0,0 +1,13 @@
+package org.jboss.tools.cdi.seam3.bot.test.base;
+
+import org.jboss.tools.cdi.seam3.bot.test.util.SeamLibraries;
+
+public class SolderTestBase extends Seam3TestBase {
+
+ @Override
+ public void prepareWorkspace() {
+ projectImportHelper.importTestProject("/resources/projects/" +
getProjectName(), getProjectName());
+ addAndCheckLibraryInProject(getProjectName(), SeamLibraries.SOLDER);
+ }
+
+}