public void Randomizing() { // Arrange var randList = new RandomList <int> { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; var randListBeforeRandomize = randList.ToArray(); var equalValues = new bool[10]; // Act randList.Randomize(); // Assert for (int i = 0; i < randList.Count; i++) { equalValues[i] = randList[i] == randListBeforeRandomize[i]; } // Ok if contains any false value Assert.Contains(equalValues, v => !v); }