X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fws%2FSequenceFetcherTest.java;h=32afd5f7ab3beaa5a328e576e31fcdac3f676fc8;hb=b6000a31609b8d7f6b9cca8df5d4878d393e2b24;hp=94bf9793132e3f20c9486b9ce25832c7a5919833;hpb=47aa21d5e079664930a91d4e48d1564f4417c6ba;p=jalview.git diff --git a/test/jalview/ws/SequenceFetcherTest.java b/test/jalview/ws/SequenceFetcherTest.java index 94bf979..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. * @@ -52,8 +82,7 @@ public class SequenceFetcherTest try { testRetrieval(argv[0], sp, - argv.length > 1 ? argv[1] : sp - .getTestQuery()); + argv.length > 1 ? argv[1] : sp.getTestQuery()); } catch (Exception e) { e.printStackTrace();