예제 #1
0
        public void TestSplitPortrait()
        {
            var root   = new ArrangeNode <string>(90, 100);
            var split  = root.Split(new IntDimension(10, 5));
            var left   = split.Item1;
            var bottom = split.Item2;

            left.SpaceAvailableY.Should().Be(5);
            bottom.SpaceAvailableX.Should().Be(90);
        }
예제 #2
0
        public void TestSplitLandscape()
        {
            var root   = new ArrangeNode <string>(100, 90);
            var split  = root.Split(new IntDimension(10, 5));
            var left   = split.Item1;
            var bottom = split.Item2;

            Console.WriteLine(root);
            Console.WriteLine("  left   = " + left);
            Console.WriteLine("  bottom = " + bottom);

            left.SpaceAvailableY.Should().Be(5);
            bottom.SpaceAvailableX.Should().Be(100);
        }