-
-
Notifications
You must be signed in to change notification settings - Fork 746
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,30 @@ | ||
namespace Refit.Tests; | ||
using Xunit; | ||
|
||
public class RefitSettings | ||
namespace Refit.Tests; | ||
|
||
public class RefitSettingsTests | ||
{ | ||
|
||
[Fact] | ||
public void Can_CreateRefitSettings_WithoutException() | ||
{ | ||
var contentSerializer = new NewtonsoftJsonContentSerializer(); | ||
var urlParameterFormatter = new DefaultUrlParameterFormatter(); | ||
var urlParameterKeyFormatter = new CamelCaseUrlParameterKeyFormatter(); | ||
var formUrlEncodedParameterFormatter = new DefaultFormUrlEncodedParameterFormatter(); | ||
|
||
var exception = Record.Exception(() => new RefitSettings()); | ||
Assert.Null(exception); | ||
|
||
exception = Record.Exception(() => new RefitSettings(contentSerializer)); | ||
Assert.Null(exception); | ||
|
||
exception = Record.Exception(() => new RefitSettings(contentSerializer, urlParameterFormatter)); | ||
Assert.Null(exception); | ||
|
||
exception = Record.Exception(() => new RefitSettings(contentSerializer, urlParameterFormatter, formUrlEncodedParameterFormatter)); | ||
Assert.Null(exception); | ||
|
||
exception = Record.Exception(() => new RefitSettings(contentSerializer, urlParameterFormatter, formUrlEncodedParameterFormatter, urlParameterKeyFormatter)); | ||
Assert.Null(exception); | ||
} | ||
} |