Xcos tests: disable some tests on headless env. 24/8424/1
Clément DAVID [Mon, 30 Jul 2012 16:32:37 +0000 (18:32 +0200)]
Change-Id: I2ace0c9d43a9b9c8755e932a19c2d03cd61a605f

scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/graph/ScicosParametersTest.java

index 646989f..1ef7670 100644 (file)
@@ -143,6 +143,10 @@ public class ScicosParametersTest {
 
     @Test
     public void checkBeansNamedProperties() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
+        if (GraphicsEnvironment.isHeadless()) {
+            return;
+        }
+
         for (int i = 0; i < DEFAULT_VALUES.length; i++) {
             Field f = DEFAULT_VALUES[i];
             String field = FIELDS[i];
@@ -157,6 +161,10 @@ public class ScicosParametersTest {
 
     @Test
     public void checkBeansPropertyChangeEvent() throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, InstantiationException {
+        if (GraphicsEnvironment.isHeadless()) {
+            return;
+        }
+
         ScicosParameters obj = new ScicosParameters();
         final List<PropertyChangeEvent> receivedEvents = new ArrayList<PropertyChangeEvent>();
 
@@ -228,6 +236,10 @@ public class ScicosParametersTest {
 
     @Test
     public void checkBeansVetoableChangeEvent() throws IllegalArgumentException, IllegalAccessException, InstantiationException {
+        if (GraphicsEnvironment.isHeadless()) {
+            return;
+        }
+
         ScicosParameters obj = new ScicosParameters();
         final List<PropertyVetoException> receivedExceptions = new ArrayList<PropertyVetoException>();