From: gmungoc Date: Mon, 24 Jul 2017 16:24:05 +0000 (+0200) Subject: JAL-1858 updated unit test asserts X-Git-Tag: Release_2_10_3b1~170 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9c5be75e5630d56a4aed31874e9e8bd30fb0fd9e;p=jalview.git JAL-1858 updated unit test asserts --- diff --git a/test/jalview/viewmodel/ViewportRangesTest.java b/test/jalview/viewmodel/ViewportRangesTest.java index 74cd8f9..851b1b7 100644 --- a/test/jalview/viewmodel/ViewportRangesTest.java +++ b/test/jalview/viewmodel/ViewportRangesTest.java @@ -13,6 +13,7 @@ import jalview.datamodel.HiddenSequences; import java.beans.PropertyChangeEvent; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; import org.testng.annotations.BeforeClass; @@ -534,9 +535,16 @@ public class ViewportRangesTest { Arrays.asList("startseq", "startseq", "startseq", "startseq"))); l.reset(); - vr.scrollToWrappedVisible(5); - assertTrue(l.verify(1, Arrays.asList("startres"))); + /* + * scrollToWrappedVisible does nothing if the target position is + * within the current startRes-endRes range + */ + assertFalse(vr.scrollToWrappedVisible(5)); + assertTrue(l.verify(0, Collections. emptyList())); l.reset(); + + vr.scrollToWrappedVisible(25); + assertTrue(l.verify(1, Arrays.asList("startres"))); } @Test(groups = { "Functional" })