Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Miller committed Nov 14, 2024
1 parent 3869985 commit 216c592
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions Maui.DataGrid.Sample/Tests/ColumnsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,10 @@ public async Task SortOrderBindingOnlyWorksWhenLoaded()

viewModel.Item = -1;

if (dataGrid.IsLoaded)
{
Assert.Equal(-1, await dataGrid.GetValueSafe(DataGrid.SortedColumnIndexProperty));
Assert.True(propertyChangedEventTriggered);
}
else
{
Assert.Null(await dataGrid.GetValueSafe(DataGrid.SortedColumnIndexProperty));
Assert.False(propertyChangedEventTriggered);
}
var sortIndex = (SortData)await dataGrid.GetValueSafe(DataGrid.SortedColumnIndexProperty);

Assert.Equal(1, sortIndex.Index);
Assert.Equal(SortingOrder.Descendant, sortIndex.Order);
Assert.True(propertyChangedEventTriggered);
}
}

0 comments on commit 216c592

Please sign in to comment.