X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fanalysis%2FAlignmentAnnotationUtilsTest.java;h=cdb950e00421d9f4a90e0d3fe04787291d8fbbc5;hb=57738a1f3c19b1c3a00bd3ac5108f8cd0af32f99;hp=7ba09e93c11f27b279abb9590bc6bafb5027d87a;hpb=52288466dd1e71946a06fd1e6ea15fa8e652c693;p=jalview.git diff --git a/test/jalview/analysis/AlignmentAnnotationUtilsTest.java b/test/jalview/analysis/AlignmentAnnotationUtilsTest.java index 7ba09e9..cdb950e 100644 --- a/test/jalview/analysis/AlignmentAnnotationUtilsTest.java +++ b/test/jalview/analysis/AlignmentAnnotationUtilsTest.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.analysis; import static org.testng.AssertJUnit.assertEquals; @@ -8,7 +28,9 @@ import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.Annotation; import jalview.datamodel.SequenceI; -import jalview.io.AppletFormatAdapter; +import jalview.gui.JvOptionPane; +import jalview.io.DataSourceType; +import jalview.io.FileFormat; import java.io.IOException; import java.util.ArrayList; @@ -18,11 +40,20 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; public class AlignmentAnnotationUtilsTest { + + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + // 4 sequences x 13 positions final static String EOL = "\n"; @@ -122,7 +153,7 @@ public class AlignmentAnnotationUtilsTest public void setUp() throws IOException { alignment = new jalview.io.FormatAdapter().readFile(TEST_DATA, - AppletFormatAdapter.PASTE, "FASTA"); + DataSourceType.PASTE, FileFormat.Fasta); AlignmentAnnotation[] anns = new AlignmentAnnotation[SEQ_ANN_COUNT]; for (int i = 0; i < anns.length; i++) @@ -378,9 +409,8 @@ public class AlignmentAnnotationUtilsTest anns[4].graphGroup = -1; anns[4].visible = true; - BitSet result = AlignmentAnnotationUtils - .getVisibleLineGraphGroups(AlignmentAnnotationUtils - .asList(anns)); + BitSet result = AlignmentAnnotationUtils.getVisibleLineGraphGroups( + AlignmentAnnotationUtils.asList(anns)); assertTrue(result.get(5)); assertFalse(result.get(0)); assertFalse(result.get(1));