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
777 B
27 lines
777 B
2 years ago
|
using Flurl.Http.Testing;
|
||
|
using Recyclarr.Common;
|
||
1 year ago
|
using Recyclarr.Config.Models;
|
||
1 year ago
|
using Recyclarr.ServarrApi.CustomFormat;
|
||
2 years ago
|
|
||
1 year ago
|
namespace Recyclarr.IntegrationTests;
|
||
2 years ago
|
|
||
|
[TestFixture]
|
||
1 year ago
|
public class CustomFormatServiceTest : IntegrationTestFixture
|
||
2 years ago
|
{
|
||
1 year ago
|
[Test]
|
||
|
public async Task Get_can_parse_json()
|
||
2 years ago
|
{
|
||
|
var resourceData = new ResourceDataReader(typeof(CustomFormatServiceTest), "Data");
|
||
|
var jsonBody = resourceData.ReadData("issue_178.json");
|
||
1 year ago
|
var config = new RadarrConfiguration {InstanceName = "instance"};
|
||
2 years ago
|
|
||
|
using var http = new HttpTest();
|
||
|
http.RespondWith(jsonBody);
|
||
|
|
||
1 year ago
|
var sut = Resolve<CustomFormatApiService>();
|
||
1 year ago
|
var result = await sut.GetCustomFormats(config);
|
||
2 years ago
|
|
||
|
result.Should().HaveCountGreaterThan(5);
|
||
|
}
|
||
|
}
|