changeset 216:c87e8cb1f864

Fix GUI tests. Reviewed-by: neugens Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2012-April/000750.html
author Roman Kennke <rkennke@redhat.com>
date Wed, 11 Apr 2012 16:31:42 +0200
parents 584121e3de8a
children 4e1e5e621b84 581d71ba9125
files client/src/test/java/com/redhat/thermostat/client/ui/MainWindowTest.java pom.xml
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/test/java/com/redhat/thermostat/client/ui/MainWindowTest.java	Wed Apr 11 15:18:17 2012 +0200
+++ b/client/src/test/java/com/redhat/thermostat/client/ui/MainWindowTest.java	Wed Apr 11 16:31:42 2012 +0200
@@ -45,13 +45,12 @@
 import java.beans.PropertyChangeEvent;
 import java.util.Objects;
 
-import net.java.openjdk.cacio.ctc.junit.CacioFESTRunner;
-
 import org.fest.swing.annotation.GUITest;
 import org.fest.swing.edt.GuiActionRunner;
 import org.fest.swing.edt.GuiTask;
 import org.fest.swing.fixture.FrameFixture;
 import org.fest.swing.fixture.JTextComponentFixture;
+import org.fest.swing.junit.v4_5.runner.GUITestRunner;
 import org.hamcrest.Description;
 import org.junit.After;
 import org.junit.Before;
@@ -67,7 +66,7 @@
 import com.redhat.thermostat.common.ActionEvent;
 import com.redhat.thermostat.common.ActionListener;
 
-@RunWith(CacioFESTRunner.class)
+@RunWith(GUITestRunner.class)
 public class MainWindowTest {
 
     private static class PropertyChangeEventMatcher extends ArgumentMatcher<PropertyChangeEvent> {
--- a/pom.xml	Wed Apr 11 15:18:17 2012 +0200
+++ b/pom.xml	Wed Apr 11 16:31:42 2012 +0200
@@ -103,6 +103,13 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
           <version>2.12</version>
+          <configuration>
+            <systemPropertyVariables>
+              <java.awt.headless>false</java.awt.headless>
+              <awt.toolkit>net.java.openjdk.cacio.ctc.CTCToolkit</awt.toolkit>
+              <java.awt.graphicsenv>net.java.openjdk.cacio.ctc.CTCGraphicsEnvironment</java.awt.graphicsenv>
+            </systemPropertyVariables>
+          </configuration>
           <dependencies>
             <dependency>
               <groupId>org.apache.maven.surefire</groupId>