Exemplo n.º 1
0
        public void CreateRelativeEdgeUnderEdgeReversed()
        {
            var       type      = typeof(UnderEdge);
            UnderEdge underEdge = null;

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

            AssertRelativeEdge(edge, type);
            underEdge = (UnderEdge)edge;
            Assert.IsTrue(underEdge.IsReversed);

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

            var edge = new UnderEdge();

            edge.Add(this.Left, this.Right);
            this.Right.Position = rightPosition;

            AssertEdgeBasic(edge, leftPosition, rightPosition);
            AssertEdgeVerticesEqualDimensions(edge);
        }