[jbosstools-commits] JBoss Tools SVN: r41681 - 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 4 10:28:59 EDT 2012


Author: jjankovi
Date: 2012-06-04 10:28:58 -0400 (Mon, 04 Jun 2012)
New Revision: 41681

Modified:
   trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchivesTestBase.java
Log:
new methods added in ArchiveTestBase

Modified: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchivesTestBase.java
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchivesTestBase.java	2012-06-04 14:13:56 UTC (rev 41680)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchivesTestBase.java	2012-06-04 14:28:58 UTC (rev 41681)
@@ -18,6 +18,7 @@
 import org.jboss.tools.ui.bot.ext.SWTTestExt;
 import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
 import org.jboss.tools.ui.bot.ext.helper.ImportHelper;
+import org.jboss.tools.ui.bot.ext.view.ErrorLogView;
 import org.jboss.tools.ui.bot.ext.view.ServersView;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite.SuiteClasses;
@@ -49,19 +50,23 @@
 	}
 	
 	protected void assertItemExistsInView(ProjectArchivesView view, String... path) {
-		assertTrue(view.itemExists(path));
+		assertTrue("Item " + path[path.length-1] + 
+				" does not exist in Project Archives View", view.itemExists(path));
 	}
 	
 	protected void assertItemExistsInExplorer(ProjectArchivesExplorer explorer, String... path) {
-		assertTrue(explorer.itemExists(path));
+		assertTrue("Item " + path[path.length-1] + 
+				" does not exist in Project Archives explorer", explorer.itemExists(path));
 	}
 	
 	protected void assertItemNotExistsInView(ProjectArchivesView view, String... path) {
-		assertFalse(view.itemExists(path));
+		assertFalse("Item " + path[path.length-1] + 
+				" should not exist in Project Archives View", view.itemExists(path));
 	}
 	
 	protected void assertItemNotExistsInExplorer(ProjectArchivesExplorer explorer, String... path) {
-		assertFalse(explorer.itemExists(path));
+		assertFalse("Item " + path[path.length-1] + 
+				" should not exist in Project Archives explorer", explorer.itemExists(path));
 	}
 	
 	protected void assertArchiveIsDeployed(String archive) {
@@ -101,6 +106,19 @@
 		return serversView;
 	}
 	
+	public void assertClearErrorLog() {
+		assertTrue("Error log contains some records", 
+				new ErrorLogView().getRecordCount() == 0);
+	}
+	
+	public static void showErrorView() {
+		new ErrorLogView().show();
+	}
+	
+	public static void clearErrorView() {
+		new ErrorLogView().clear();
+	}
+	
 	protected static void importProject(String projectName) {
 		
 		String location = "/resources/prj/" + projectName;



More information about the jbosstools-commits mailing list