Author: jpeterka
Date: 2012-08-07 08:59:20 -0400 (Tue, 07 Aug 2012)
New Revision: 42879
Modified:
trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/src/org/jboss/tools/dummy/ui/bot/test/DummyTest.java
Log:
Update dummy ui bot test to provide basic bot test
Modified:
trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/src/org/jboss/tools/dummy/ui/bot/test/DummyTest.java
===================================================================
---
trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/src/org/jboss/tools/dummy/ui/bot/test/DummyTest.java 2012-08-07
11:30:18 UTC (rev 42878)
+++
trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/src/org/jboss/tools/dummy/ui/bot/test/DummyTest.java 2012-08-07
12:59:20 UTC (rev 42879)
@@ -1,8 +1,12 @@
package org.jboss.tools.dummy.ui.bot.test;
-import static org.junit.Assert.assertTrue;
+import java.io.OutputStreamWriter;
+import org.apache.log4j.ConsoleAppender;
+import org.apache.log4j.Logger;
+import org.apache.log4j.PatternLayout;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -15,16 +19,20 @@
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class DummyTest {
-
+
@BeforeClass
public static void before() {
- assertTrue(true);
}
@Test
public void dummyTest() {
- assertTrue(true);
+ Logger log = Logger.getLogger(this.getClass());
+ ConsoleAppender ca = new ConsoleAppender();
+ ca.setWriter(new OutputStreamWriter(System.out));
+ ca.setLayout(new PatternLayout("[%-5p] %t: %m%n"));
+ log.addAppender(ca);
+
+ SWTWorkbenchBot bot = new SWTWorkbenchBot();
+ log.info("Shell with title \"" + bot.shells()[0].getText() +
"\" found");
}
-
-
}
Show replies by date