Skip to content

Commit c96ebd8

Browse files
committed
Aligned exceptions in domain object
1 parent ecbafb0 commit c96ebd8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

LinkDotNet.Blog.Domain/ProfileInformationEntry.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static ProfileInformationEntry Create(string key, int sortOrder)
1818
{
1919
if (string.IsNullOrWhiteSpace(key))
2020
{
21-
throw new ArgumentOutOfRangeException(nameof(key));
21+
throw new ArgumentNullException(nameof(key));
2222
}
2323

2424
return new ProfileInformationEntry

LinkDotNet.Blog.UnitTests/Domain/ProfileInformationEntryTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void ShouldThrowExceptionWhenEmptyKeyOrValue(string content)
2424
{
2525
Action act = () => ProfileInformationEntry.Create(content, 0);
2626

27-
act.Should().Throw<ArgumentOutOfRangeException>();
27+
act.Should().Throw<ArgumentNullException>();
2828
}
2929

3030
[Fact]

0 commit comments

Comments
 (0)