jellyfin-server/tests/Jellyfin.Extensions.Tests/ShuffleExtensionsTests.cs

22 lines
498 B
C#
Raw Normal View History

2021-01-26 19:21:07 +00:00
using System;
using Xunit;
namespace Jellyfin.Extensions.Tests
2021-01-26 19:21:07 +00:00
{
public static class ShuffleExtensionsTests
{
private static readonly Random _rng = new Random();
[Fact]
public static void Shuffle_Valid_Correct()
{
byte[] original = new byte[1 << 6];
_rng.NextBytes(original);
byte[] shuffled = (byte[])original.Clone();
shuffled.Shuffle();
Assert.NotEqual(original, shuffled);
}
}
}