Пример #1
0
        public void PositionateAbsoluteEdgeWithNoLeft()
        {
            var edge = new OnTopEdge();

            edge.Add(null, null);
            edge.Positionate(WIDTH, HEIGHT);
        }
Пример #2
0
        public void PositionateAbsoluteOnTopEdge()
        {
            var edge = new OnTopEdge();

            edge.Add(this.Left, null);
            edge.Positionate(WIDTH, HEIGHT);

            Assert.IsNotNull(edge.Left.Position);
            Assert.AreEqual(edge.Left, this.Left);
            Assert.AreEqual(edge.Left.Position.Value.Y, 0);
        }
Пример #3
0
        public void PositionateLeftRelativeOnTopEdge()
        {
            var rightPosition = new Vector2(WIDTH / 2, HEIGHT / 2);
            var leftPosition  = rightPosition - new Vector2(0, this.Left.Height);

            var edge = new OnTopEdge();

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

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