[jbosstools-commits] JBoss Tools SVN: r41856 - trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Jun 11 08:49:50 EDT 2012


Author: jjankovi
Date: 2012-06-11 08:49:50 -0400 (Mon, 11 Jun 2012)
New Revision: 41856

Added:
   trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchiveViewReSwitchingTest.java
Modified:
   trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchivesAllBotTests.java
Log:
ArchiveViewReSwitchingTest implemented and included in suite

Added: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchiveViewReSwitchingTest.java
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchiveViewReSwitchingTest.java	                        (rev 0)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchiveViewReSwitchingTest.java	2012-06-11 12:49:50 UTC (rev 41856)
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * 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.archives.ui.bot.test;
+
+import org.jboss.tools.archives.ui.bot.test.view.ProjectArchivesView;
+import org.jboss.tools.ui.bot.ext.entity.JavaProjectEntity;
+import org.jboss.tools.ui.bot.ext.view.ErrorLogView;
+import org.jboss.tools.ui.bot.ext.view.ViewBase;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+
+/**
+ * 
+ * @author jjankovi
+ *
+ */
+public class ArchiveViewReSwitchingTest extends ArchivesTestBase {
+
+	private static String projectName = "prj";
+	private static ErrorLogView errors = new ErrorLogView();
+	
+	@BeforeClass
+	public static void setup() {
+		
+		/* show all tested views */
+		console.show();
+		servers.show();
+		errors .show();
+		
+		/* create test project */
+		JavaProjectEntity project = new JavaProjectEntity();
+		project.setProjectName(projectName);
+		eclipse.createJavaProject(project);
+	}
+	
+	@Test
+	public void testReSwitchingView() {
+		
+		/* setup Project Archives view for project */
+		ProjectArchivesView view = viewForProject(projectName);
+		
+		/* test project is included in view */
+		assertItemExistsInView(view, projectName);
+		
+		/* test reswitching Project Archives view with some other views */
+		reSwitchAndTestArchivesViewWithViews(console, servers, errors);
+		
+	}
+	
+	private void reSwitchAndTestArchivesViewWithViews(ViewBase... views) {
+		for (ViewBase view : views) {
+			view.show();
+			ProjectArchivesView archiveView = openProjectArchivesView();
+			assertItemExistsInView(archiveView, projectName);
+		}
+	}
+	
+}

Modified: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchivesAllBotTests.java
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchivesAllBotTests.java	2012-06-11 12:19:50 UTC (rev 41855)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchivesAllBotTests.java	2012-06-11 12:49:50 UTC (rev 41856)
@@ -22,6 +22,7 @@
 @SuiteClasses({
 	ViewIsPresentTest.class,
 	VariousProjectsArchiving.class,
+	ArchiveViewReSwitchingTest.class,
 	BuildingArchiveNode.class,
 	BuildingProjectTest.class,
 	BuildingArchiveTest.class,



More information about the jbosstools-commits mailing list