From: gmungoc Date: Wed, 8 Apr 2015 14:17:55 +0000 (+0100) Subject: JAL-1270 separated standalone tests out of Jws2ParamView, interactive X-Git-Tag: Jalview_2_9~69^2~11 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=86c580ce122275898f6ecb1a3d70d32fd79d5815;p=jalview.git JAL-1270 separated standalone tests out of Jws2ParamView, interactive test marked @Ignore --- diff --git a/test/jalview/ws/gui/Jws2ParamView.java b/test/jalview/ws/gui/Jws2ParamView.java index 5c8dab0..4c67d25 100644 --- a/test/jalview/ws/gui/Jws2ParamView.java +++ b/test/jalview/ws/gui/Jws2ParamView.java @@ -21,8 +21,8 @@ package jalview.ws.gui; import java.awt.BorderLayout; +import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; -import java.awt.event.WindowListener; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -31,10 +31,9 @@ import javax.swing.JFrame; import javax.swing.JPanel; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; -import compbio.metadata.Option; -import compbio.metadata.Parameter; import compbio.metadata.Preset; import compbio.metadata.PresetManager; @@ -69,212 +68,96 @@ public class Jws2ParamView { Cache.initLogger(); disc = JalviewJabawsTestUtils.getJabawsDiscoverer(); - } + /** + * This test marked Ignore as it appears to need user action to complete + * rather than hang + */ @Test + @Ignore public void testJws2Gui() { - Jws2Instance lastserv = null; Iterator presetEnum = presetTests.iterator(); for (Jws2Instance service : disc.getServices()) { - lastserv = service; if (serviceTests.size() == 0 || serviceTests.contains(service.serviceType.toLowerCase())) { - if (lastserv != null) + List prl = null; + Preset pr = null; + if (presetEnum.hasNext()) { - List prl = null; - Preset pr = null; - if (presetEnum.hasNext()) + PresetManager prman = service.getPresets(); + if (prman != null) { - PresetManager prman = lastserv.getPresets(); - if (prman != null) + pr = prman.getPresetByName(presetEnum.next()); + if (pr == null) { - pr = prman.getPresetByName(presetEnum.next()); - if (pr == null) - { - // just grab the last preset. - prl = prman.getPresets(); - } + // just grab the last preset. + prl = prman.getPresets(); } } - else + } + else + { + PresetManager prman = service.getPresets(); + if (prman != null) { - PresetManager prman = lastserv.getPresets(); - if (prman != null) - { - prl = prman.getPresets(); - } + prl = prman.getPresets(); } - Iterator en = (prl == null) ? null : prl.iterator(); - while (en != null && en.hasNext()) + } + Iterator en = (prl == null) ? null : prl.iterator(); + while (en != null && en.hasNext()) + { + if (en != null) { - if (en != null) - { - if (!en.hasNext()) - { - en = prl.iterator(); - } - pr = en.next(); - } + if (!en.hasNext()) { - System.out.println("Testing opts dupes for " - + lastserv.getUri() + " : " - + lastserv.getActionText() + ":" + pr.getName()); - List