2021-01-26 19:21:07 +00:00
|
|
|
using System;
|
|
|
|
using Xunit;
|
|
|
|
|
2021-06-19 16:02:33 +00:00
|
|
|
namespace Jellyfin.Extensions.Tests
|
2021-01-26 19:21:07 +00:00
|
|
|
{
|
|
|
|
public static class ShuffleExtensionsTests
|
|
|
|
{
|
|
|
|
[Fact]
|
|
|
|
public static void Shuffle_Valid_Correct()
|
|
|
|
{
|
|
|
|
byte[] original = new byte[1 << 6];
|
2021-10-08 13:40:13 +00:00
|
|
|
Random.Shared.NextBytes(original);
|
2021-01-26 19:21:07 +00:00
|
|
|
byte[] shuffled = (byte[])original.Clone();
|
|
|
|
shuffled.Shuffle();
|
|
|
|
|
|
|
|
Assert.NotEqual(original, shuffled);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|