Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public override string GetFullPath(string path)
throw new ArgumentNullException(nameof(path), StringResources.Manager.GetString("VALUE_CANNOT_BE_NULL"));
}

if (path.Length == 0)
if (string.IsNullOrWhiteSpace(path))
{
throw CommonExceptions.PathIsNotOfALegalForm(nameof(path));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,16 @@ public void GetFullPath_EmptyValue_ShouldThrowArgumentException()
Assert.Throws<ArgumentException>(action);
}

[Test]
public void GetFullPath_WithWhiteSpace_ShouldThrowArgumentException()
{
var mockFileSystem = new MockFileSystem();

TestDelegate action = () => mockFileSystem.Path.GetFullPath(" ");

Assert.Throws<ArgumentException>(action);
}

[Test]
public void GetFullPath_WithMultipleDirectorySeparators_ShouldReturnTheNormalizedForm()
{
Expand Down