aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2021-05-05 13:33:34 +0200
committerBond_009 <bond.009@outlook.com>2021-05-05 13:33:34 +0200
commit39931fe3ade3ad10e758b3dbb5acf80c37bc05fa (patch)
tree7f290f95f8c911b230362610950eb4f2b3739de6
parent48e81e65e8948fa61980744932eb4103a28ed876 (diff)
Add regression test for ContainerProfile.ContainsContainer
-rw-r--r--MediaBrowser.Model/Dlna/ContainerProfile.cs1
-rw-r--r--tests/Jellyfin.Model.Tests/Dlna/ContainerProfileTests.cs19
2 files changed, 19 insertions, 1 deletions
diff --git a/MediaBrowser.Model/Dlna/ContainerProfile.cs b/MediaBrowser.Model/Dlna/ContainerProfile.cs
index c66ec8bc3..530ffed43 100644
--- a/MediaBrowser.Model/Dlna/ContainerProfile.cs
+++ b/MediaBrowser.Model/Dlna/ContainerProfile.cs
@@ -1,7 +1,6 @@
#pragma warning disable CS1591
using System;
-using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Xml.Serialization;
diff --git a/tests/Jellyfin.Model.Tests/Dlna/ContainerProfileTests.cs b/tests/Jellyfin.Model.Tests/Dlna/ContainerProfileTests.cs
new file mode 100644
index 000000000..cca056c28
--- /dev/null
+++ b/tests/Jellyfin.Model.Tests/Dlna/ContainerProfileTests.cs
@@ -0,0 +1,19 @@
+using MediaBrowser.Model.Dlna;
+using Xunit;
+
+namespace Jellyfin.Model.Tests.Dlna
+{
+ public class ContainerProfileTests
+ {
+ private readonly ContainerProfile _emptyContainerProfile = new ContainerProfile();
+
+ [Theory]
+ [InlineData(null)]
+ [InlineData("")]
+ [InlineData("mp4")]
+ public void ContainsContainer_EmptyContainerProfile_True(string? containers)
+ {
+ Assert.True(_emptyContainerProfile.ContainsContainer(containers));
+ }
+ }
+}