aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Api.Tests/Controllers/DynamicHlsControllerTests.cs
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2021-10-08 07:49:40 -0600
committerCody Robibero <cody@robibe.ro>2021-10-08 07:49:40 -0600
commit3bbd98cc3fb4e69b5d5471ab7cbdcc22d59a8eb9 (patch)
treed6a0aeb4896ec9ab4305916f0380606483180786 /tests/Jellyfin.Api.Tests/Controllers/DynamicHlsControllerTests.cs
parent7a7fe3e681eca87cde631336c9af565fd6dfe0d7 (diff)
parenta01f9775fffaacfd0fc03b24bff366b4701fe45e (diff)
Merge remote-tracking branch 'upstream/master' into schedules-direct
Diffstat (limited to 'tests/Jellyfin.Api.Tests/Controllers/DynamicHlsControllerTests.cs')
-rw-r--r--tests/Jellyfin.Api.Tests/Controllers/DynamicHlsControllerTests.cs39
1 files changed, 13 insertions, 26 deletions
diff --git a/tests/Jellyfin.Api.Tests/Controllers/DynamicHlsControllerTests.cs b/tests/Jellyfin.Api.Tests/Controllers/DynamicHlsControllerTests.cs
index 117083815..1f06e8fde 100644
--- a/tests/Jellyfin.Api.Tests/Controllers/DynamicHlsControllerTests.cs
+++ b/tests/Jellyfin.Api.Tests/Controllers/DynamicHlsControllerTests.cs
@@ -1,13 +1,5 @@
using System;
-using System.Collections.Generic;
-using AutoFixture;
-using AutoFixture.AutoMoq;
using Jellyfin.Api.Controllers;
-using Jellyfin.Api.Helpers;
-using Jellyfin.Api.Models.StreamingDtos;
-using MediaBrowser.Controller.Library;
-using MediaBrowser.Controller.MediaEncoding;
-using Moq;
using Xunit;
namespace Jellyfin.Api.Tests.Controllers
@@ -26,33 +18,28 @@ namespace Jellyfin.Api.Tests.Controllers
}
}
- public static IEnumerable<object[]> GetSegmentLengths_Success_TestData()
+ public static TheoryData<long, int, double[]> GetSegmentLengths_Success_TestData()
{
- yield return new object[] { 0, 6, Array.Empty<double>() };
- yield return new object[]
- {
+ var data = new TheoryData<long, int, double[]>();
+ data.Add(0, 6, Array.Empty<double>());
+ data.Add(
TimeSpan.FromSeconds(3).Ticks,
6,
- new double[] { 3 }
- };
- yield return new object[]
- {
+ new double[] { 3 });
+ data.Add(
TimeSpan.FromSeconds(6).Ticks,
6,
- new double[] { 6 }
- };
- yield return new object[]
- {
+ new double[] { 6 });
+ data.Add(
TimeSpan.FromSeconds(3.3333333).Ticks,
6,
- new double[] { 3.3333333 }
- };
- yield return new object[]
- {
+ new double[] { 3.3333333 });
+ data.Add(
TimeSpan.FromSeconds(9.3333333).Ticks,
6,
- new double[] { 6, 3.3333333 }
- };
+ new double[] { 6, 3.3333333 });
+
+ return data;
}
}
}