Repository: AvaloniaUI/Avalonia
File: tests/Avalonia.Controls.UnitTests/GridTests.cs (C#)

Code before:
        {
            // Issue #2746
            var grid = new Grid
            {
                RowDefinitions = RowDefinitions.Parse("Auto"),
                Children =
                {
                    new TestControl
                    {
                        MeasureSize = new Size(150, 150),
                    }
                }
            };

            var parent = new Decorator { Child = grid };

            parent.Measure(new Size(100, 100));
            parent.Arrange(new Rect(grid.DesiredSize));

            Assert.Equal(new Size(100, 100), grid.Bounds.Size);
        }

        [Theory]
        [InlineData(true)]
        [InlineData(false)]
        public void Change_Column_Width_Should_Invalidate_Grid(bool setUsingAvaloniaProperty)
        {
            var grid = new Grid { ColumnDefinitions = ColumnDefinitions.Parse("1*,1*") };

            Change_Propery_And_Verify_Measure_Requested(grid, () =>
            {
                if (setUsingAvaloniaProperty)
                    grid.ColumnDefinitions[0][ColumnDefinition.WidthProperty] = new GridLength(5);
                else
                    grid.ColumnDefinitions[0].Width = new GridLength(5);
            });
        }

        [Theory]
        [InlineData(true)]
        [InlineData(false)]
        public void Change_Column_MinWidth_Should_Invalidate_Grid(bool setUsingAvaloniaProperty)
        {
            var grid = new Grid { ColumnDefinitions = ColumnDefinitions.Parse("1*,1*") };

            Change_Propery_And_Verify_Measure_Requested(grid, () =>
            {
                if (setUsingAvaloniaProperty)
                    grid.ColumnDefinitions[0][ColumnDefinition.MinWidthProperty] = 5;
                else
                    grid.ColumnDefinitions[0].MinWidth = 5;

Review comment (suggestion):
Nits:  `Change_Column_Width_Should_Invalidate_Grid` -> `Changing_Column_Width_Should_Invalidate_Grid` 

Other similar tests should have the same correction too

Code after:
        {
            // Issue #2746
            var grid = new Grid
            {
                RowDefinitions = RowDefinitions.Parse("Auto"),
                Children =
                {
                    new TestControl
                    {
                        MeasureSize = new Size(150, 150),
                    }
                }
            };

            var parent = new Decorator { Child = grid };

            parent.Measure(new Size(100, 100));
            parent.Arrange(new Rect(grid.DesiredSize));

            Assert.Equal(new Size(100, 100), grid.Bounds.Size);
        }

        [Theory]
        [InlineData(true)]
        [InlineData(false)]
        public void Changing_Column_Width_Should_Invalidate_Grid(bool setUsingAvaloniaProperty)
        {
            var grid = new Grid { ColumnDefinitions = ColumnDefinitions.Parse("1*,1*") };

            Change_Property_And_Verify_Measure_Requested(grid, () =>
            {
                if (setUsingAvaloniaProperty)
                    grid.ColumnDefinitions[0][ColumnDefinition.WidthProperty] = new GridLength(5);
                else
                    grid.ColumnDefinitions[0].Width = new GridLength(5);
            });
        }

        [Theory]
        [InlineData(true)]
        [InlineData(false)]
        public void Changing_Column_MinWidth_Should_Invalidate_Grid(bool setUsingAvaloniaProperty)
        {
            var grid = new Grid { ColumnDefinitions = ColumnDefinitions.Parse("1*,1*") };

            Change_Property_And_Verify_Measure_Requested(grid, () =>
            {
                if (setUsingAvaloniaProperty)
                    grid.ColumnDefinitions[0][ColumnDefinition.MinWidthProperty] = 5;
                else
                    grid.ColumnDefinitions[0].MinWidth = 5;