Skip to content

Commit

Permalink
Update src/Microsoft.Graph.Cli.Core.Tests/Http/UriReplacement/MeUriRe…
Browse files Browse the repository at this point in the history
…placementTests.cs

Co-authored-by: Peter Ombwa <[email protected]>
  • Loading branch information
calebkiage and peombwa authored Nov 1, 2023
1 parent d0eefa2 commit 51d1fa1
Showing 1 changed file with 8 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,18 @@ public void Returns_Null_When_Given_A_Null_Url()
Assert.Null(replacement.Replace(null));
}

[Fact]
public void Returns_Original_Uri_When_No_Match_Is_Found()
[Theory]
[InlineData("http://example.com/test")]
[InlineData("http://example.com/users/messages")]
[InlineData("http://example.com/v1.0/users/messages")]
[InlineData("http://example.com/users/test/me")]
[InlineData("http://example.com/a/b/users/test/me")]
public void Returns_Original_Uri_When_No_Match_Is_Found(string inputUri)
{
var uri = new Uri("http://example.com/test");
var uri = new Uri(inputUri);
var replacement = new MeUriReplacement();

Assert.Equal(uri, replacement.Replace(uri));

uri = new Uri("http://example.com/users/messages");
Assert.Equal(uri, replacement.Replace(uri));

uri = new Uri("http://example.com/v1.0/users/messages");
Assert.Equal(uri, replacement.Replace(uri));

uri = new Uri("http://example.com/users/test/me");
Assert.Equal(uri, replacement.Replace(uri));

uri = new Uri("http://example.com/a/b/users/test/me");
Assert.Equal(uri, replacement.Replace(uri));
}

[Theory]
Expand Down

0 comments on commit 51d1fa1

Please sign in to comment.