-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance SplitPropertyPath to conditionally handle parentheses in prop… (
#16054) * Enhance SplitPropertyPath to conditionally handle parentheses in property paths * added test for SplitPropertyPath
- Loading branch information
Showing
2 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
tests/Avalonia.Controls.DataGrid.UnitTests/Utils/ReflectionHelperTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
using Avalonia.Controls.Utils; | ||
using Xunit; | ||
|
||
namespace Avalonia.Controls.DataGrid.UnitTests.Utils | ||
{ | ||
public class ReflectionHelperTests | ||
{ | ||
[Fact] | ||
public void SplitPropertyPath_Splits_PropertyPath_With_Cast() | ||
{ | ||
var path = "(Type).Property"; | ||
var expected = new [] { "Property" }; | ||
|
||
var result = TypeHelper.SplitPropertyPath(path); | ||
|
||
Assert.Equal(expected, result); | ||
} | ||
} | ||
} |