Skip to content

Commit

Permalink
feat(Tests): RefitSettings tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tcortega committed Jun 4, 2024
1 parent 006c3c9 commit 6913370
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions Refit.Tests/RefitSettings.cs
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);
}
}

0 comments on commit 6913370

Please sign in to comment.