public void CreateRelativeEdgeInFrontEdgeReversed() { var type = typeof(InFrontEdge); InFrontEdge inFrontEdge = null; var edge = this.Factory.Create(this.Left, this.Right, new List <string>() { "in" }, new List <string>() { "front" }, false); AssertRelativeEdge(edge, type); inFrontEdge = (InFrontEdge)edge; Assert.IsTrue(inFrontEdge.IsReversed); edge = this.Factory.Create(this.Right, this.Left, new List <string>() { "with", "in", "front" }, new List <string>(), true); AssertRelativeEdge(edge, type); inFrontEdge = (InFrontEdge)edge; Assert.IsTrue(inFrontEdge.IsReversed); }
public void PositionateLeftRelativeInFrontEdge() { var rightPosition = new Vector2(WIDTH / 2, HEIGHT / 2); var leftPosition = rightPosition - new Vector2(this.Right.Width / 2, -this.Right.Height / 2); var edge = new InFrontEdge(); edge.Add(this.Left, this.Right); this.Right.Position = rightPosition; AssertEdgeBasic(edge, leftPosition, rightPosition); AssertEdgeVerticesEqualDimensions(edge); Assert.AreNotEqual(edge.Left.ZIndex, edge.Right.ZIndex); Assert.IsTrue(edge.Left.ZIndex > edge.Right.ZIndex); }