X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=test%2Fjalview%2Fws%2FSequenceFetcherTest.java;h=32afd5f7ab3beaa5a328e576e31fcdac3f676fc8;hb=c4b90e7ff57436d6bb96d316eed24c887b241f4d;hp=4e084300f8ea90bf66b9ac4b72667408b0beb179;hpb=b10330c2e330e409d2fd3812f1001f9542dc1b36;p=jalview.git
diff --git a/test/jalview/ws/SequenceFetcherTest.java b/test/jalview/ws/SequenceFetcherTest.java
index 4e08430..32afd5f 100644
--- a/test/jalview/ws/SequenceFetcherTest.java
+++ b/test/jalview/ws/SequenceFetcherTest.java
@@ -1,3 +1,23 @@
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview 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 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview 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 Jalview. If not, see .
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
package jalview.ws;
import jalview.analysis.CrossRef;
@@ -5,6 +25,7 @@ import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.DBRefSource;
import jalview.datamodel.SequenceI;
+import jalview.gui.JvOptionPane;
import jalview.ws.seqfetcher.ASequenceFetcher;
import jalview.ws.seqfetcher.DbSourceProxy;
@@ -12,9 +33,18 @@ import java.util.Enumeration;
import java.util.List;
import java.util.Vector;
+import org.testng.annotations.BeforeClass;
+
public class SequenceFetcherTest
{
+ @BeforeClass(alwaysRun = true)
+ public void setUpJvOptionPane()
+ {
+ JvOptionPane.setInteractiveMode(false);
+ JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+ }
+
/**
* simple run method to test dbsources.
*
@@ -25,8 +55,6 @@ public class SequenceFetcherTest
// TODO: extracted from SequenceFetcher - convert to proper unit test with
// assertions
- AlignmentI ds = null;
- Vector