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.
109 lines
3.0 KiB
109 lines
3.0 KiB
1 year ago
|
using Recyclarr.Cli.Pipelines.MediaNaming.PipelinePhases;
|
||
|
using Recyclarr.ServarrApi.MediaNaming;
|
||
|
|
||
|
namespace Recyclarr.Cli.Tests.Pipelines.MediaNaming;
|
||
|
|
||
|
[TestFixture]
|
||
|
public class MediaNamingTransactionPhaseRadarrTest
|
||
|
{
|
||
1 year ago
|
[Test] [AutoMockData]
|
||
1 year ago
|
public void Radarr_left_null(
|
||
|
MediaNamingTransactionPhase sut)
|
||
|
{
|
||
|
var left = new RadarrMediaNamingDto();
|
||
|
|
||
|
var right = new ProcessedNamingConfig
|
||
|
{
|
||
|
Dto = new RadarrMediaNamingDto
|
||
|
{
|
||
|
RenameMovies = true,
|
||
|
StandardMovieFormat = "file_format",
|
||
|
MovieFolderFormat = "folder_format"
|
||
|
}
|
||
|
};
|
||
|
|
||
|
var result = sut.Execute(left, right);
|
||
|
|
||
|
result.Should().BeEquivalentTo(right.Dto, o => o.RespectingRuntimeTypes());
|
||
|
}
|
||
|
|
||
1 year ago
|
[Test] [AutoMockData]
|
||
1 year ago
|
public void Radarr_right_null(
|
||
|
MediaNamingTransactionPhase sut)
|
||
|
{
|
||
|
var left = new RadarrMediaNamingDto
|
||
|
{
|
||
|
RenameMovies = true,
|
||
|
StandardMovieFormat = "file_format",
|
||
|
MovieFolderFormat = "folder_format"
|
||
|
};
|
||
|
|
||
|
var right = new ProcessedNamingConfig
|
||
|
{
|
||
|
Dto = new RadarrMediaNamingDto()
|
||
|
};
|
||
|
|
||
|
var result = sut.Execute(left, right);
|
||
|
|
||
|
result.Should().BeEquivalentTo(left, o => o.RespectingRuntimeTypes());
|
||
|
}
|
||
|
|
||
1 year ago
|
[Test] [AutoMockData]
|
||
1 year ago
|
public void Radarr_right_and_left_with_rename(
|
||
|
MediaNamingTransactionPhase sut)
|
||
|
{
|
||
|
var left = new RadarrMediaNamingDto
|
||
|
{
|
||
|
RenameMovies = false,
|
||
|
StandardMovieFormat = "file_format",
|
||
|
MovieFolderFormat = "folder_format"
|
||
|
};
|
||
|
|
||
|
var right = new ProcessedNamingConfig
|
||
|
{
|
||
|
Dto = new RadarrMediaNamingDto
|
||
|
{
|
||
|
RenameMovies = true,
|
||
|
StandardMovieFormat = "file_format2",
|
||
|
MovieFolderFormat = "folder_format2"
|
||
|
}
|
||
|
};
|
||
|
|
||
|
var result = sut.Execute(left, right);
|
||
|
|
||
|
result.Should().BeEquivalentTo(right.Dto, o => o.RespectingRuntimeTypes());
|
||
|
}
|
||
|
|
||
1 year ago
|
[Test] [AutoMockData]
|
||
1 year ago
|
public void Radarr_right_and_left_without_rename(
|
||
|
MediaNamingTransactionPhase sut)
|
||
|
{
|
||
|
var left = new RadarrMediaNamingDto
|
||
|
{
|
||
|
RenameMovies = true,
|
||
|
StandardMovieFormat = "file_format",
|
||
|
MovieFolderFormat = "folder_format"
|
||
|
};
|
||
|
|
||
|
var right = new ProcessedNamingConfig
|
||
|
{
|
||
|
Dto = new RadarrMediaNamingDto
|
||
|
{
|
||
|
RenameMovies = false,
|
||
|
StandardMovieFormat = "file_format2",
|
||
|
MovieFolderFormat = "folder_format2"
|
||
|
}
|
||
|
};
|
||
|
|
||
|
var result = sut.Execute(left, right);
|
||
|
|
||
|
result.Should().BeEquivalentTo(new RadarrMediaNamingDto
|
||
|
{
|
||
|
RenameMovies = false,
|
||
1 year ago
|
StandardMovieFormat = "file_format2",
|
||
1 year ago
|
MovieFolderFormat = "folder_format2"
|
||
|
},
|
||
|
o => o.RespectingRuntimeTypes());
|
||
|
}
|
||
|
}
|