Skip to content

Commit

Permalink
Add StringExtensions tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anaguma13 committed Sep 22, 2024
1 parent 33d059c commit 595d4fa
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/Mockaco.AspNetCore.Tests/Extensions/StringExtensionsTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
namespace Mockaco.Tests.Extensions;

public class StringExtensionsTests
{
[Fact]
public void Returns_False_For_Null_String()
{
string? stringValue = null;
Assert.False(stringValue.IsRemoteAbsolutePath());
}

[Fact]
public void Returns_False_For_Empty_String()
{
string? stringValue = "";
Assert.False(stringValue.IsRemoteAbsolutePath());
}

[Fact]
public void Returns_False_For_Relative_Path()
{
string? stringValue = ".";
Assert.False(stringValue.IsRemoteAbsolutePath());
}

[Fact]
public void Returns_True_For_Absolute_Path()
{
string? stringValue = "http://www.github.com";
Assert.True(stringValue.IsRemoteAbsolutePath());
}
}

0 comments on commit 595d4fa

Please sign in to comment.