diff --git a/src/Microsoft.Graph.Cli.Core.Tests/Http/UriReplacement/MeUriReplacementTests.cs b/src/Microsoft.Graph.Cli.Core.Tests/Http/UriReplacement/MeUriReplacementTests.cs index 038ca53a..b3e90c77 100644 --- a/src/Microsoft.Graph.Cli.Core.Tests/Http/UriReplacement/MeUriReplacementTests.cs +++ b/src/Microsoft.Graph.Cli.Core.Tests/Http/UriReplacement/MeUriReplacementTests.cs @@ -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]