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.
31 lines
961 B
31 lines
961 B
using System.IO.Abstractions.TestingHelpers;
|
|
using AutoFixture.NUnit3;
|
|
using FluentAssertions;
|
|
using NSubstitute;
|
|
using NUnit.Framework;
|
|
using TestLibrary.AutoFixture;
|
|
using TrashLib.Radarr.Config;
|
|
using TrashLib.Radarr.CustomFormat.Guide;
|
|
|
|
namespace TrashLib.Tests.Radarr.CustomFormat.Guide;
|
|
|
|
[TestFixture]
|
|
[Parallelizable(ParallelScope.All)]
|
|
public class LocalRepoCustomFormatJsonParserTest
|
|
{
|
|
[Test, AutoMockData]
|
|
public void Get_custom_format_json_works(
|
|
[Frozen] IResourcePaths paths,
|
|
[Frozen(Matching.ImplementedInterfaces)] MockFileSystem fileSystem,
|
|
LocalRepoCustomFormatJsonParser sut)
|
|
{
|
|
paths.RepoPath.Returns("");
|
|
fileSystem.AddFile("docs/json/radarr/first.json", new MockFileData("first"));
|
|
fileSystem.AddFile("docs/json/radarr/second.json", new MockFileData("second"));
|
|
|
|
var results = sut.GetCustomFormatJson();
|
|
|
|
results.Should().BeEquivalentTo("first", "second");
|
|
}
|
|
}
|