aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Common.Tests/Extensions/CopyToExtensionsTests.cs
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2021-10-26 17:43:36 -0600
committerCody Robibero <cody@robibe.ro>2021-10-26 17:43:36 -0600
commitf78f1e834ce1907157d4d43cf8564cf40d05fb9f (patch)
treebeb4e348e4d338a8b459f8a421ba19409d478ba9 /tests/Jellyfin.Common.Tests/Extensions/CopyToExtensionsTests.cs
parent2888567ea53c1c839b0cd69e0ec1168cf51f36a8 (diff)
parent39d5bdac96b17eb92bd304736cc2728832e1cad0 (diff)
Merge remote-tracking branch 'upstream/master' into client-logger
Diffstat (limited to 'tests/Jellyfin.Common.Tests/Extensions/CopyToExtensionsTests.cs')
-rw-r--r--tests/Jellyfin.Common.Tests/Extensions/CopyToExtensionsTests.cs40
1 files changed, 0 insertions, 40 deletions
diff --git a/tests/Jellyfin.Common.Tests/Extensions/CopyToExtensionsTests.cs b/tests/Jellyfin.Common.Tests/Extensions/CopyToExtensionsTests.cs
deleted file mode 100644
index 9903409fa..000000000
--- a/tests/Jellyfin.Common.Tests/Extensions/CopyToExtensionsTests.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System;
-using System.Collections.Generic;
-using MediaBrowser.Common.Extensions;
-using Xunit;
-
-namespace Jellyfin.Common.Tests.Extensions
-{
- public static class CopyToExtensionsTests
- {
- public static IEnumerable<object[]> CopyTo_Valid_Correct_TestData()
- {
- yield return new object[] { new[] { 0, 1, 2, 3, 4, 5 }, new[] { 0, 0, 0, 0, 0, 0 }, 0, new[] { 0, 1, 2, 3, 4, 5 } };
- yield return new object[] { new[] { 0, 1, 2 }, new[] { 5, 4, 3, 2, 1, 0 }, 2, new[] { 5, 4, 0, 1, 2, 0 } };
- }
-
- [Theory]
- [MemberData(nameof(CopyTo_Valid_Correct_TestData))]
- public static void CopyTo_Valid_Correct<T>(IReadOnlyList<T> source, IList<T> destination, int index, IList<T> expected)
- {
- source.CopyTo(destination, index);
- Assert.Equal(expected, destination);
- }
-
- public static IEnumerable<object[]> CopyTo_Invalid_ThrowsArgumentOutOfRangeException_TestData()
- {
- yield return new object[] { new[] { 0, 1, 2, 3, 4, 5 }, new[] { 0, 0, 0, 0, 0, 0 }, -1 };
- yield return new object[] { new[] { 0, 1, 2 }, new[] { 5, 4, 3, 2, 1, 0 }, 6 };
- yield return new object[] { new[] { 0, 1, 2 }, Array.Empty<int>(), 0 };
- yield return new object[] { new[] { 0, 1, 2, 3, 4, 5 }, new[] { 0 }, 0 };
- yield return new object[] { new[] { 0, 1, 2, 3, 4, 5 }, new[] { 0, 0, 0, 0, 0, 0 }, 1 };
- }
-
- [Theory]
- [MemberData(nameof(CopyTo_Invalid_ThrowsArgumentOutOfRangeException_TestData))]
- public static void CopyTo_Invalid_ThrowsArgumentOutOfRangeException<T>(IReadOnlyList<T> source, IList<T> destination, int index)
- {
- Assert.Throws<ArgumentOutOfRangeException>(() => source.CopyTo(destination, index));
- }
- }
-}