JAL-2388 Minor refactoring
[jalview.git] / test / jalview / viewmodel / OverviewDimensionsTest.java
index a9770bd..7c40fe9 100644 (file)
@@ -257,7 +257,7 @@ public class OverviewDimensionsTest {
   @Test(groups = { "Functional" })
   public void testSetBoxFromMouseClick()
   {
-    od.checkValid();
+    od.setBoxPositionByMouse(0, 0);
     assertEquals(od.getBoxX(), 0);
     assertEquals(od.getBoxY(), 0);
     assertEquals(od.getBoxWidth(), boxWidth);
@@ -347,7 +347,7 @@ public class OverviewDimensionsTest {
   @Test(groups = { "Functional" })
   public void testFromMouseWithHiddenColsAtStart()
   {
-    od.checkValid();
+    od.setBoxPositionByMouse(0, 0);
     assertEquals(od.getBoxX(), 0);
     assertEquals(od.getBoxY(), 0);
     assertEquals(od.getBoxWidth(), boxWidth);
@@ -409,7 +409,7 @@ public class OverviewDimensionsTest {
   @Test(groups = { "Functional" })
   public void testFromMouseWithHiddenColsInMiddle()
   {
-    od.checkValid();
+    od.setBoxPositionByMouse(0, 0);
     assertEquals(od.getBoxX(), 0);
     assertEquals(od.getBoxY(), 0);
     assertEquals(od.getBoxWidth(), boxWidth);
@@ -510,7 +510,7 @@ public class OverviewDimensionsTest {
   @Test(groups = { "Functional" })
   public void testFromMouseWithHiddenColsAtEnd()
   {
-    od.checkValid();
+    od.setBoxPositionByMouse(0, 0);
     assertEquals(od.getBoxX(), 0);
     assertEquals(od.getBoxY(), 0);
     assertEquals(od.getBoxWidth(), boxWidth);
@@ -840,7 +840,7 @@ public class OverviewDimensionsTest {
   @Test(groups = { "Functional" })
   public void testFromMouseWithHiddenRowsAtStart()
   {
-    od.checkValid();
+    od.setBoxPositionByMouse(0, 0);
     assertEquals(od.getBoxX(), 0);
     assertEquals(od.getBoxY(), 0);
     assertEquals(od.getBoxWidth(), boxWidth);
@@ -884,7 +884,7 @@ public class OverviewDimensionsTest {
   @Test(groups = { "Functional" })
   public void testFromMouseWithHiddenRowsInMiddle()
   {
-    od.checkValid();
+    od.setBoxPositionByMouse(0, 0);
     assertEquals(od.getBoxX(), 0);
     assertEquals(od.getBoxY(), 0);
     assertEquals(od.getBoxWidth(), boxWidth);
@@ -941,7 +941,7 @@ public class OverviewDimensionsTest {
   @Test(groups = { "Functional" })
   public void testFromMouseWithHiddenRowsAtEnd()
   {
-    od.checkValid();
+    od.setBoxPositionByMouse(0, 0);
     assertEquals(od.getBoxX(), 0);
     assertEquals(od.getBoxY(), 0);
     assertEquals(od.getBoxWidth(), boxWidth);
@@ -1036,9 +1036,7 @@ public class OverviewDimensionsTest {
    */
   private void mouseClick(OverviewDimensions od, int x, int y)
   {
-    od.setBoxX(x);
-    od.setBoxY(y);
-    od.checkValid();
+    od.setBoxPositionByMouse(x, y);
     // updates require an OverviewPanel to exist which it doesn't here
     // so call setBoxPosition() as it would be called by the AlignmentPanel
     // normally