Exemplo n.º 1
0
        public void CreateRelativeEdgeBehindEdgeReversed()
        {
            var        type        = typeof(BehindEdge);
            BehindEdge inFrontEdge = null;

            var edge = this.Factory.Create(this.Left, this.Right, new List <string>()
            {
                "from"
            }, new List <string>()
            {
                "behind"
            }, false);

            AssertRelativeEdge(edge, type);
            inFrontEdge = (BehindEdge)edge;
            Assert.IsTrue(inFrontEdge.IsReversed);

            edge = this.Factory.Create(this.Right, this.Left, new List <string>()
            {
                "in", "behind"
            }, new List <string>(), true);
            AssertRelativeEdge(edge, type);
            inFrontEdge = (BehindEdge)edge;
            Assert.IsTrue(inFrontEdge.IsReversed);
        }
Exemplo n.º 2
0
        public void PositionateLeftRelativeBehindEdge()
        {
            var rightPosition = new Vector2(WIDTH / 2, HEIGHT / 2);
            var leftPosition  = rightPosition + new Vector2(this.Right.Width / 2, -this.Right.Height / 2);

            var edge = new BehindEdge();

            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);
        }