Skip to content

Commit

Permalink
Issue #81: Add test for Uri Template case insensitivity
Browse files Browse the repository at this point in the history
  • Loading branch information
ichbinsteffen committed Jul 2, 2023
1 parent b04d492 commit 42b5225
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Microsoft.Kiota.Abstractions.Tests/RequestInformationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,22 @@ public void GetsAndSetsResponseHandlerByType()
serializationWriterMock.Verify(x => x.WriteStringValue(It.IsAny<string>(), It.IsAny<string>()), Times.Never);
serializationWriterMock.Verify(x => x.WriteCollectionOfPrimitiveValues(It.IsAny<string>(), It.IsAny<IEnumerable<string>>()), Times.Once);
}
[Fact]
public void GetUriResolvesParametersCaseInsensitive()
{
// Arrange
var testRequest = new RequestInformation()
{
HttpMethod = Method.GET,
UrlTemplate = "http://localhost/{URITemplate}/ParameterMapping?IsCaseSensitive={IsCaseSensitive}"
};
// Act
testRequest.PathParameters.Add("UriTemplate", "UriTemplate");
testRequest.QueryParameters.Add("iscasesensitive", "false");

// Assert
Assert.Equal("http://localhost/UriTemplate/ParameterMapping?IsCaseSensitive=false", testRequest.URI.ToString());
}
}

/// <summary>The messages in a mailbox or folder. Read-only. Nullable.</summary>
Expand Down

0 comments on commit 42b5225

Please sign in to comment.