mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2025-12-30 06:40:07 -06:00
37 lines
1007 B
C#
37 lines
1007 B
C#
#if(DEBUG)
|
|
|
|
using FileFlows.Plex.Media;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
namespace FileFlows.Plex.Tests;
|
|
|
|
[TestClass]
|
|
public class PlexTests
|
|
{
|
|
[TestMethod]
|
|
public void Plex_Basic()
|
|
{
|
|
var args = new NodeParameters(@"/media/movies/The Batman (2022)/The Batman.mkv", new TestLogger(), false, string.Empty);
|
|
args.GetPluginSettingsJson = (string input) =>
|
|
{
|
|
return File.ReadAllText("../../../settings.json");
|
|
};
|
|
|
|
var node = new PlexUpdater();
|
|
Assert.AreEqual(1, node.Execute(args));
|
|
}
|
|
[TestMethod]
|
|
public void Plex_Fail()
|
|
{
|
|
var args = new NodeParameters(@"/media/unknownmovies/The Batman (2022)/The Batman.mkv", new TestLogger(), false, string.Empty);
|
|
args.GetPluginSettingsJson = (string input) =>
|
|
{
|
|
return File.ReadAllText("../../../settings.json");
|
|
};
|
|
|
|
var node = new PlexUpdater();
|
|
Assert.AreEqual(2, node.Execute(args));
|
|
}
|
|
}
|
|
|
|
#endif |