-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'finbourne-dev' into dev
- Loading branch information
Showing
17 changed files
with
356 additions
and
323 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace RestSharp.Tests.Headers; | ||
|
||
public class DefaultHeaderTests { | ||
const string BaseUrl = "http://localhost:8888/"; | ||
|
||
[Fact] | ||
public void AddDefaultHeadersUsingDictionary() { | ||
var headers = new Dictionary<string, string> { | ||
{ KnownHeaders.ContentType, ContentType.Json }, | ||
{ KnownHeaders.Accept, ContentType.Json }, | ||
{ KnownHeaders.ContentEncoding, "gzip, deflate" } | ||
}; | ||
|
||
var expected = headers.Select(x => new HeaderParameter(x.Key, x.Value)); | ||
|
||
using var client = new RestClient(BaseUrl); | ||
client.AddDefaultHeaders(headers); | ||
|
||
var actual = client.DefaultParameters.Select(x => x as HeaderParameter); | ||
expected.Should().BeSubsetOf(actual); | ||
} | ||
|
||
} |
4 changes: 2 additions & 2 deletions
4
test/RestSharp.Tests/AddRangeTests.cs → ...stSharp.Tests/Headers/HeaderRangeTests.cs
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
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...p.Tests/ObjectParameterTests.ArrayData.cs → ...ameters/ObjectParameterTests.ArrayData.cs
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
2 changes: 1 addition & 1 deletion
2
...arp.Tests/ObjectParameterTests.CsvData.cs → ...arameters/ObjectParameterTests.CsvData.cs
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
2 changes: 1 addition & 1 deletion
2
...sts/ObjectParameterTests.FormattedData.cs → ...ers/ObjectParameterTests.FormattedData.cs
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
2 changes: 1 addition & 1 deletion
2
...p.Tests/ObjectParameterTests.NamedData.cs → ...ameters/ObjectParameterTests.NamedData.cs
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
2 changes: 1 addition & 1 deletion
2
test/RestSharp.Tests/ObjectParameterTests.cs → ....Tests/Parameters/ObjectParameterTests.cs
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
2 changes: 1 addition & 1 deletion
2
...stSharp.Tests/ParameterValidationTests.cs → ...ts/Parameters/ParameterValidationTests.cs
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
Oops, something went wrong.