ShuffleExtensionsTests.cs 446 B

12345678910111213141516171819
  1. using System;
  2. using Xunit;
  3. namespace Jellyfin.Extensions.Tests
  4. {
  5. public static class ShuffleExtensionsTests
  6. {
  7. [Fact]
  8. public static void Shuffle_Valid_Correct()
  9. {
  10. byte[] original = new byte[1 << 6];
  11. Random.Shared.NextBytes(original);
  12. byte[] shuffled = (byte[])original.Clone();
  13. shuffled.Shuffle();
  14. Assert.NotEqual(original, shuffled);
  15. }
  16. }
  17. }