예제 #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);
        }