vr.setStartSeq(-1);
assertEquals(vr.getStartSeq(), 0);
- vr.setStartSeq(al.getHeight());
- assertEquals(vr.getStartSeq(), al.getHeight() - 1);
+ vr.setStartSeq(al.getHeight() - vr.getViewportHeight() + 1);
+ assertEquals(vr.getStartSeq(), al.getHeight() - vr.getViewportHeight());
- vr.setStartSeq(al.getHeight() - 1);
- assertEquals(vr.getStartSeq(), al.getHeight() - 1);
+ vr.setStartSeq(al.getHeight() - vr.getViewportHeight());
+ assertEquals(vr.getStartSeq(), al.getHeight() - vr.getViewportHeight());
}
@Test(groups = { "Functional" })
MockPropChangeListener l = new MockPropChangeListener(vr);
List<String> emptylist = new ArrayList<String>();
+ vr.setViewportWidth(5);
+ vr.setViewportHeight(5);
+ l.reset();
+
// one event fired when startRes is called with new value
vr.setStartRes(4);
assertTrue(l.verify(1, Arrays.asList("startres")));