aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Api.Tests/TestPlugin.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2021-02-22 21:00:15 -0500
committerGitHub <noreply@github.com>2021-02-22 21:00:15 -0500
commitda55462d92f645d20f63eab3d7ffc8e141497ac5 (patch)
treef839d6f689308be9b74b4f53f01df70f984c9b06 /tests/Jellyfin.Api.Tests/TestPlugin.cs
parent1442a63556e87f1318ff091df81c4ffa083de699 (diff)
parentbaadc48f43ec425659d0d7210f1a97416d7d34c5 (diff)
Merge pull request #5291 from Bond-009/tests12
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"
+ };
+ }
+ }
+}