Example #1
0
        public void Draw_NoFixeWidthComponentSizeChanged_LayoutContainerIsNotTriggered()
        {
            var componentMock = new GraphicComponentMock { HorizontalPolicy = ResizePolicy.Extending };
            var container = CreateContainer(componentMock);

            componentMock.RaiseSizeChanged();
            container.Draw();

            layoutMock.Verify(l => l.LayoutContainer(container), Times.Never);
        }
Example #2
0
        public void Draw_FixedHightComponentSizeChanged_LayoutContainerIsTriggered()
        {
            var componentMock = new GraphicComponentMock { VerticalPolicy = ResizePolicy.Fixed };
            var container = CreateContainer(componentMock);

            componentMock.RaiseSizeChanged();
            container.Draw();

            layoutMock.Verify(l => l.LayoutContainer(container), Times.Once);
        }