Skip to content

Commit

Permalink
Add missing test for ChangeExtension
Browse files Browse the repository at this point in the history
  • Loading branch information
vbreuss committed Apr 16, 2024
1 parent 1599ebb commit e43d4f4
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ public void ChangeExtension_WithDotOnlyInDirectory_ShouldAppendExtensionToPath(
result.Should().Be(expectedResult);
}

[SkippableTheory]
[AutoData]
public void ChangeExtension_WithFileStartingWithDot_ShouldAppendExtensionToPath(
string fileName, string extension)
{
string path = $".{fileName}";
string expectedResult = $".{extension}";

string result = FileSystem.Path.ChangeExtension(path, extension);

result.Should().Be(expectedResult);
}

[SkippableTheory]
[AutoData]
public void ChangeExtension_WithLeadingDotInExtension_ShouldNotIncludeTwoDots(
Expand Down

0 comments on commit e43d4f4

Please sign in to comment.