forked from ThreeMammals/Ocelot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ThreeMammals#555 added some tests for this issue but struggling to re…
…plicate (ThreeMammals#570) * ThreeMammals#555 added some tests for this issue but struggling to replicate * ThreeMammals#555 removed cmd=instance from service fabric code as someone who knows service fabric says its not needed I * ThreeMammals#555 renamed test
- Loading branch information
1 parent
b0bdeb9
commit 369fc5b
Showing
4 changed files
with
63 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Net.Http; | ||
using Ocelot.Request.Middleware; | ||
using Shouldly; | ||
using Xunit; | ||
|
||
namespace Ocelot.UnitTests.Request | ||
{ | ||
public class DownstreamRequestTests | ||
{ | ||
[Fact] | ||
public void should_have_question_mark_with_question_mark_prefixed() | ||
{ | ||
var httpRequestMessage = new HttpRequestMessage(); | ||
httpRequestMessage.RequestUri = new Uri("https://example.com/a?b=c"); | ||
var downstreamRequest = new DownstreamRequest(httpRequestMessage); | ||
var result = downstreamRequest.ToHttpRequestMessage(); | ||
result.RequestUri.Query.ShouldBe("?b=c"); | ||
} | ||
} | ||
} |