Skip to content

Commit d42fdf6

Browse files
committed
fix: Tests for new guards
1 parent 1d68297 commit d42fdf6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/LinkDotNet.Blog.UnitTests/Domain/ProfileInformationEntryTests.cs

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

25-
act.Should().Throw<ArgumentNullException>();
25+
act.Should().Throw<ArgumentException>();
2626
}
2727

2828
[Fact]

tests/LinkDotNet.Blog.UnitTests/Domain/SkillTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void ShouldThrowWhenWhitespaceName(string name)
2424
{
2525
Action result = () => Skill.Create(name, "url", "backend", ProficiencyLevel.Expert.Key);
2626

27-
result.Should().Throw<ArgumentNullException>();
27+
result.Should().Throw<ArgumentException>();
2828
}
2929

3030
[Theory]
@@ -35,7 +35,7 @@ public void ShouldThrowWhenWhitespaceCapability(string capability)
3535
{
3636
Action result = () => Skill.Create("name", "url", capability, ProficiencyLevel.Expert.Key);
3737

38-
result.Should().Throw<ArgumentNullException>();
38+
result.Should().Throw<ArgumentException>();
3939
}
4040

4141
[Fact]

tests/LinkDotNet.Blog.UnitTests/Domain/TagTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ public void ShouldThrowExceptionIfInvalid(string content)
2121
{
2222
Action act = () => Tag.Create(content);
2323

24-
act.Should().Throw<ArgumentNullException>();
24+
act.Should().Throw<ArgumentException>();
2525
}
2626
}

0 commit comments

Comments
 (0)