Permissions: Protect GetIdsFromPathReversed against invalid program exception (#20930)
* Updates to protect GetIdsFromPathReversed against invalid program exception. * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -389,9 +389,11 @@ public class StringExtensionsTests
|
||||
}
|
||||
}
|
||||
|
||||
[TestCase(null, "")]
|
||||
[TestCase("", "")]
|
||||
[TestCase("1,2,3,4,5", "5,4,3,2,1")]
|
||||
[TestCase("1,2,x,4,5", "5,4,2,1")]
|
||||
public void GetIdsFromPathReversed(string input, string expected)
|
||||
public void GetIdsFromPathReversed_ReturnsExpectedResult(string input, string expected)
|
||||
{
|
||||
var ids = input.GetIdsFromPathReversed();
|
||||
Assert.AreEqual(expected, string.Join(",", ids));
|
||||
|
||||
Reference in New Issue
Block a user