import static org.testng.AssertJUnit.assertSame;
import static org.testng.AssertJUnit.assertTrue;
+import jalview.api.AlignViewportI;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
import jalview.bin.Cache;
import jalview.bin.Jalview;
import jalview.datamodel.AlignedCodonFrame;
import jalview.schemes.PIDColourScheme;
import jalview.structure.StructureSelectionManager;
import jalview.util.MapList;
+import jalview.viewmodel.AlignmentViewport;
import jalview.viewmodel.ViewportRanges;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.testng.Assert;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
public class AlignViewportTest
{
AlignmentI al;
- AlignViewport testee;
+ AlignmentViewport testee;
@BeforeClass(alwaysRun = true)
public static void setUpBeforeClass() throws Exception
AlignViewport viewport = af.getViewport();
synchronized (this)
{
- while (viewport.getAlignmentConservationAnnotation() != null)
+ while (viewport.getCalcManager().isWorking())
{
try
{
{
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
- AlignViewport av = af.getViewport();
+ AlignViewportI av = af.getViewport();
SequenceGroup sg1 = new SequenceGroup();
SequenceGroup sg2 = new SequenceGroup();
SequenceGroup sg3 = new SequenceGroup();
jalview.bin.Cache.setProperty("SHOW_OCCUPANCY", Boolean.FALSE.toString());
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
- AlignViewport av = af.getViewport();
- Assert.assertNull(av.getAlignmentGapAnnotation(), "Preference did not disable occupancy row.");
+ AlignViewportI av = af.getViewport();
+ Assert.assertNull(av.getAlignmentGapAnnotation(),
+ "Preference did not disable occupancy row.");
int c = 0;
for (AlignmentAnnotation aa : av.getAlignment().findAnnotations(null,
null, "Occupancy"))
af = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
av = af.getViewport();
- Assert.assertNotNull(av.getAlignmentGapAnnotation(), "Preference did not enable occupancy row.");
+ Assert.assertNotNull(av.getAlignmentGapAnnotation(),
+ "Preference did not enable occupancy row.");
c = 0;
for (AlignmentAnnotation aa : av.getAlignment().findAnnotations(null,
null, av.getAlignmentGapAnnotation().label))
String fasta = ">s1\nA-C\n>s2\nA-C\n>s3\nA-D\n>s4\n--D\n";
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(fasta,
DataSourceType.PASTE);
- AlignViewport testme = af.getViewport();
+ AlignmentViewport testme = af.getViewport();
SequenceI cons = testme.getConsensusSeq();
assertEquals("A-C", cons.getSequenceAsString());
}