3 import jalview.bin.Cache;
4 import jalview.datamodel.AlignmentAnnotation;
5 import jalview.datamodel.SequenceI;
6 import jalview.gui.Desktop;
8 import java.time.Instant;
11 import org.testng.annotations.AfterClass;
12 import org.testng.annotations.BeforeClass;
13 import org.testng.annotations.BeforeTest;
15 public class Jalview2xmlBase
19 * @throws java.lang.Exception
21 @BeforeClass(alwaysRun = true)
22 public static void setUpBeforeClass() throws Exception
24 jalview.bin.Jalview.main(new String[] { "-props",
25 "test/jalview/io/testProps.jvprops" });
26 jalview.bin.Cache.setProperty(
27 "JALVIEW_NEWS_RSS_LASTMODIFIED",
28 Cache.date_format.format(Date.from(Instant.now().plusSeconds(
33 * @throws java.lang.Exception
35 @AfterClass(alwaysRun = true)
36 public static void tearDownAfterClass() throws Exception
38 jalview.gui.Desktop.instance.closeAll_actionPerformed(null);
41 @BeforeTest(alwaysRun = true)
42 public static void clearDesktop()
44 Desktop.instance.closeAll_actionPerformed(null);
47 public int countDsAnn(jalview.viewmodel.AlignmentViewport avp)
50 for (SequenceI sq : avp.getAlignment().getDataset().getSequences())
52 if (sq.getAnnotation() != null)
54 for (AlignmentAnnotation dssa : sq.getAnnotation())
56 if (dssa.isValidStruc())