public void TestMeasureSingleIcon()
        {
            var style = LayoutTestStyle.Create();
            var l     = new IconLabel(style);

            style.StyleResolver.AddRoot(l);

            l.Image.Texture = LayoutTestStyle.CreateTexture("Image", 40, 30);

            l.Measure(Size.Auto);

            l.DesiredSize.Should().Be(new Size(60, 50));
        }
        public void TestArrangeFullZeroWidth()
        {
            var style = LayoutTestStyle.Create();
            var l     = new IconLabel(style);

            style.StyleResolver.AddRoot(l);

            l.Image.Texture = LayoutTestStyle.CreateTexture("Image", 40, 30);
            l.Label.Text    = "Test";

            l.Arrange(new Rectangle(10, 20, 0, 0));

            l.LayoutRect.Should().Be(new Rectangle(10, 5, 70, 50));
            l.Image.LayoutRect.Should().Be(new Rectangle(20, 15, 40, 30));
            l.Label.LayoutRect.Should().Be(new Rectangle(70, 30, 0, 0));

            l.LayoutRect.Center.Y.Should().Be(30);
            l.Image.LayoutRect.Center.Y.Should().Be(30);
            l.Label.LayoutRect.Center.Y.Should().Be(30);
        }
        public void TestArrangeFull()
        {
            var style = LayoutTestStyle.Create();
            var l     = new IconLabel(style);

            style.StyleResolver.AddRoot(l);

            l.Image.Texture = LayoutTestStyle.CreateTexture("Image", 40, 30);
            l.Label.Text    = "Test";

            l.Arrange(new Rectangle(10, 20, 300, 200));
            l.IconTextGap.Should().Be(10);
            l.LayoutRect.Should().Be(new Rectangle(10, 20, 134, 200));
            l.Image.LayoutRect.Should().Be(new Rectangle(20, 105, 40, 30));
            l.Label.LayoutRect.Should().Be(new Rectangle(70, 30, 64, 180));

            l.LayoutRect.Center.Y.Should().Be(120);
            l.Image.LayoutRect.Center.Y.Should().Be(120);
            l.Label.LayoutRect.Center.Y.Should().Be(120);
        }