aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Api.Tests/TestPlugin.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2021-02-23 12:54:05 +0100
committerGitHub <noreply@github.com>2021-02-23 12:54:05 +0100
commite09e67deae5fc19a830178b9a7574c7c23e282bc (patch)
treec46d2efa0e8e17203f1ea865233324616f707c05 /tests/Jellyfin.Api.Tests/TestPlugin.cs
parentff10dd9e127068fc058e17b21628d2679013ac8a (diff)
parent7ece3c552337340a997a75aab1520a501a673f61 (diff)
Merge branch 'master' into tests11
Diffstat (limited to 'tests/Jellyfin.Api.Tests/TestPlugin.cs')
-rw-r--r--tests/Jellyfin.Api.Tests/TestPlugin.cs43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/Jellyfin.Api.Tests/TestPlugin.cs b/tests/Jellyfin.Api.Tests/TestPlugin.cs
new file mode 100644
index 000000000..a3b4b6994
--- /dev/null
+++ b/tests/Jellyfin.Api.Tests/TestPlugin.cs
@@ -0,0 +1,43 @@
+#pragma warning disable CS1591
+
+using System;
+using System.Collections.Generic;
+using MediaBrowser.Common.Configuration;
+using MediaBrowser.Common.Plugins;
+using MediaBrowser.Model.Plugins;
+using MediaBrowser.Model.Serialization;
+
+namespace Jellyfin.Api.Tests
+{
+ public class TestPlugin : BasePlugin<BasePluginConfiguration>, IHasWebPages
+ {
+ public TestPlugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
+ : base(applicationPaths, xmlSerializer)
+ {
+ Instance = this;
+ }
+
+ public static TestPlugin? Instance { get; private set; }
+
+ public override Guid Id => new Guid("2d350a13-0bf7-4b61-859c-d5e601b5facf");
+
+ public override string Name => nameof(TestPlugin);
+
+ public override string Description => "Server test Plugin.";
+
+ public IEnumerable<PluginPageInfo> GetPages()
+ {
+ yield return new PluginPageInfo
+ {
+ Name = Name,
+ EmbeddedResourcePath = GetType().Namespace + ".TestPage.html"
+ };
+
+ yield return new PluginPageInfo
+ {
+ Name = "BrokenPage",
+ EmbeddedResourcePath = GetType().Namespace + ".foobar"
+ };
+ }
+ }
+}