private void AssertEdgeBasic(IPositionateEdge edge, Vector2 leftPosition, Vector2 rightPosition) { edge.Positionate(WIDTH, HEIGHT); Assert.IsNotNull(edge.Right.Position); Assert.IsNotNull(edge.Left.Position); Assert.IsTrue(edge.Right.IsPositioned); Assert.IsTrue(edge.Left.IsPositioned); Assert.AreEqual(edge.Left.Position, leftPosition); Assert.AreEqual(edge.Right.Position, rightPosition); }
private void AssertEdgeInside(IPositionateEdge edge, int divideFactor = 2) { edge.Positionate(WIDTH, HEIGHT); Assert.IsNotNull(edge.Right.Position); Assert.IsNotNull(edge.Left.Position); Assert.IsTrue(edge.Right.IsPositioned); Assert.IsTrue(edge.Left.IsPositioned); Assert.IsTrue(edge.Left.ZIndex > edge.Right.ZIndex); Assert.IsTrue(edge.Left.Width <= edge.Right.Width / divideFactor); Assert.IsTrue(edge.Left.Height <= edge.Right.Height / divideFactor); }