Skip to content

Commit f8598fb

Browse files
authored
Fix ToByteArray() test (#13872)
1 parent 9b145b0 commit f8598fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/OrchardCore.Abstractions.Tests/Modules/StringExtensionsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class StringExtensionsTests
77
{
88
[Theory]
99
[InlineData(new byte[0], "")]
10-
[InlineData(new byte[]{ 10, 20, 30 }, "0A141E")]
10+
[InlineData(new byte[] { 10, 20, 30 }, "0A141E")]
1111
public void ToHexString_ReturnsCorrectHexString(byte[] bytes, string expected)
1212
{
1313
// Arrange
@@ -41,7 +41,7 @@ public void ToByteArray_ShouldThrowException_WhenHexContainsOddNumberOfCharacter
4141
var hex = "41424";
4242

4343
// Act & Assert
44-
Assert.Throws<FormatException>(() => hex.ToByteArray());
44+
Assert.Throws<ArgumentOutOfRangeException>(() => hex.ToByteArray());
4545
}
4646

4747
[Fact]

0 commit comments

Comments
 (0)