From 9c5be75e5630d56a4aed31874e9e8bd30fb0fd9e Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 24 Jul 2017 18:24:05 +0200 Subject: [PATCH] JAL-1858 updated unit test asserts --- test/jalview/viewmodel/ViewportRangesTest.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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" }) -- 1.7.10.2