From da5a0287abf137c88765cac89c5c4d6c7c5a4739 Mon Sep 17 00:00:00 2001 From: prmr Date: Thu, 3 Dec 2015 08:50:22 -0500 Subject: [PATCH] #136 Fixed the tests for the new version of ObjectNode --- .../cs/stg/jetuml/graph/TestObjectNode.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/ca/mcgill/cs/stg/jetuml/graph/TestObjectNode.java b/test/ca/mcgill/cs/stg/jetuml/graph/TestObjectNode.java index be50d912c..3b023acdc 100644 --- a/test/ca/mcgill/cs/stg/jetuml/graph/TestObjectNode.java +++ b/test/ca/mcgill/cs/stg/jetuml/graph/TestObjectNode.java @@ -53,10 +53,10 @@ public void testDefault() { assertEquals(new Rectangle2D.Double(0, 0, 80, 60), aObject1.getBounds()); assertEquals(0,aObject1.getChildren().size()); - assertEquals(new Point2D.Double(80,0), aObject1.getConnectionPoint(Direction.EAST)); - assertEquals(new Point2D.Double(0,0), aObject1.getConnectionPoint(Direction.WEST)); - assertEquals(new Point2D.Double(0,0), aObject1.getConnectionPoint(Direction.NORTH)); - assertEquals(new Point2D.Double(0,0), aObject1.getConnectionPoint(Direction.SOUTH)); + assertEquals(new Point2D.Double(80,30), aObject1.getConnectionPoint(Direction.EAST)); + assertEquals(new Point2D.Double(0,30), aObject1.getConnectionPoint(Direction.WEST)); + assertEquals(new Point2D.Double(40,0), aObject1.getConnectionPoint(Direction.NORTH)); + assertEquals(new Point2D.Double(40,60), aObject1.getConnectionPoint(Direction.SOUTH)); assertEquals("", aObject1.getName().toString()); assertEquals(new Rectangle2D.Double(0, 0, 80, 60), aObject1.getShape().getBounds()); } @@ -107,10 +107,10 @@ public void testClone() ObjectNode clone = aObject1.clone(); assertEquals(new Rectangle2D.Double(0, 0, 80, 60), clone.getBounds()); assertEquals(0,clone.getChildren().size()); - assertEquals(new Point2D.Double(80,0), clone.getConnectionPoint(Direction.EAST)); - assertEquals(new Point2D.Double(0,0), clone.getConnectionPoint(Direction.WEST)); - assertEquals(new Point2D.Double(0,0), clone.getConnectionPoint(Direction.NORTH)); - assertEquals(new Point2D.Double(0,0), clone.getConnectionPoint(Direction.SOUTH)); + assertEquals(new Point2D.Double(80,30), clone.getConnectionPoint(Direction.EAST)); + assertEquals(new Point2D.Double(0,30), clone.getConnectionPoint(Direction.WEST)); + assertEquals(new Point2D.Double(40,0), clone.getConnectionPoint(Direction.NORTH)); + assertEquals(new Point2D.Double(40,60), clone.getConnectionPoint(Direction.SOUTH)); assertEquals("o1", clone.getName().toString()); assertEquals(new Rectangle2D.Double(0, 0, 80, 60), clone.getShape().getBounds());