Mercurial > hg > release > thermostat-0.13
changeset 214:3e3ef085b144
Use Cacio for GUI tests.
Reviewed-by: neugens
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2012-April/000746.html
author | Roman Kennke <rkennke@redhat.com> |
---|---|
date | Wed, 11 Apr 2012 13:53:22 +0200 |
parents | 4b7c4bfec7a6 |
children | 584121e3de8a |
files | client/pom.xml client/src/test/java/com/redhat/thermostat/client/ui/MainWindowTest.java common/src/main/java/com/redhat/thermostat/test/GUITest.java pom.xml |
diffstat | 4 files changed, 36 insertions(+), 47 deletions(-) [+] |
line wrap: on
line diff
--- a/client/pom.xml Tue Apr 10 23:20:16 2012 +0200 +++ b/client/pom.xml Wed Apr 11 13:53:22 2012 +0200 @@ -67,6 +67,12 @@ <artifactId>fest-swing</artifactId> <scope>test</scope> </dependency> + <dependency> + <groupId>net.java.openjdk.cacio</groupId> + <artifactId>cacio-tta</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>com.redhat.thermostat</groupId> <artifactId>thermostat-common</artifactId> @@ -78,4 +84,24 @@ </dependency> </dependencies> + <!-- TODO: This is only temporary until Cacio has been released and hit Maven central. --> + <repositories> + <repository> + <releases> + <enabled>false</enabled> + <updatePolicy>always</updatePolicy> + <checksumPolicy>warn</checksumPolicy> + </releases> + <snapshots> + <enabled>true</enabled> + <updatePolicy>never</updatePolicy> + <checksumPolicy>fail</checksumPolicy> + </snapshots> + <id>sonatype-snapshots</id> + <name>Sonatype Snapshots</name> + <url>https://oss.sonatype.org/content/repositories/snapshots/</url> + <layout>default</layout> + </repository> + </repositories> + </project>
--- a/client/src/test/java/com/redhat/thermostat/client/ui/MainWindowTest.java Tue Apr 10 23:20:16 2012 +0200 +++ b/client/src/test/java/com/redhat/thermostat/client/ui/MainWindowTest.java Wed Apr 11 13:53:22 2012 +0200 @@ -45,6 +45,9 @@ 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; @@ -54,6 +57,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; +import org.junit.runner.RunWith; import org.mockito.ArgumentMatcher; import com.redhat.thermostat.client.ChangeableText; @@ -62,8 +66,8 @@ import com.redhat.thermostat.client.UiFacadeFactory; import com.redhat.thermostat.common.ActionEvent; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.test.GUITest; +@RunWith(CacioFESTRunner.class) public class MainWindowTest { private static class PropertyChangeEventMatcher extends ArgumentMatcher<PropertyChangeEvent> {
--- a/common/src/main/java/com/redhat/thermostat/test/GUITest.java Tue Apr 10 23:20:16 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright 2012 Red Hat, Inc. - * - * This file is part of Thermostat. - * - * Thermostat is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published - * by the Free Software Foundation; either version 2, or (at your - * option) any later version. - * - * Thermostat is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Thermostat; see the file COPYING. If not see - * <http://www.gnu.org/licenses/>. - * - * Linking this code with other modules is making a combined work - * based on this code. Thus, the terms and conditions of the GNU - * General Public License cover the whole combination. - * - * As a special exception, the copyright holders of this code give - * you permission to link this code with independent modules to - * produce an executable, regardless of the license terms of these - * independent modules, and to copy and distribute the resulting - * executable under terms of your choice, provided that you also - * meet, for each linked independent module, the terms and conditions - * of the license of that module. An independent module is a module - * which is not derived from or based on this code. If you modify - * this code, you may extend this exception to your version of the - * library, but you are not obligated to do so. If you do not wish - * to do so, delete this exception statement from your version. - */ - -package com.redhat.thermostat.test; - -/** - * Used to annotate tests that are using a display, i.e. pop up windows or such. We might want to exclude them. - * - * This is here in common/main so that it can be found by maven even whem running from toplevel module. - */ -public interface GUITest { - -}
--- a/pom.xml Tue Apr 10 23:20:16 2012 +0200 +++ b/pom.xml Wed Apr 11 13:53:22 2012 +0200 @@ -147,6 +147,11 @@ <artifactId>powermock-module-junit4</artifactId> <version>${powermock.version}</version> </dependency> + <dependency> + <groupId>net.java.openjdk.cacio</groupId> + <artifactId>cacio-tta</artifactId> + <version>0.1-SNAPSHOT</version> + </dependency> <dependency> <groupId>org.jfree</groupId>