aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Server.Integration.Tests/TestPlugin.cs
blob: 1d67ac48709991c7a0e4d6e36a6757fc1ce12888 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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.Server.Integration.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"
            };
        }
    }
}