You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
771 B
27 lines
771 B
1 year ago
|
using Flurl.Http.Testing;
|
||
|
using Recyclarr.Common;
|
||
8 months ago
|
using Recyclarr.Config.Models;
|
||
8 months ago
|
using Recyclarr.ServarrApi.Services;
|
||
1 year ago
|
|
||
8 months ago
|
namespace Recyclarr.IntegrationTests;
|
||
1 year ago
|
|
||
|
[TestFixture]
|
||
|
[Parallelizable(ParallelScope.All)]
|
||
8 months ago
|
public class CustomFormatServiceTest : IntegrationTestFixture
|
||
1 year ago
|
{
|
||
8 months ago
|
[Test]
|
||
|
public async Task Get_can_parse_json()
|
||
1 year ago
|
{
|
||
|
var resourceData = new ResourceDataReader(typeof(CustomFormatServiceTest), "Data");
|
||
|
var jsonBody = resourceData.ReadData("issue_178.json");
|
||
|
|
||
|
using var http = new HttpTest();
|
||
|
http.RespondWith(jsonBody);
|
||
|
|
||
|
var sut = Resolve<CustomFormatService>();
|
||
8 months ago
|
var result = await sut.GetCustomFormats(Substitute.ForPartsOf<ServiceConfiguration>());
|
||
1 year ago
|
|
||
|
result.Should().HaveCountGreaterThan(5);
|
||
|
}
|
||
|
}
|