Ejemplo n.º 1
0
        public void WhenOrderedCollectionsThenShuffleShouldReturnUnorderedCollection()
        {
            //Arrange
            var source   = Enumerable.Range(0, 1000).ToList();
            var shuffled = IEnumerableUtil.Shuffle(source).ToList();

            Assert.AreNotSame(source, shuffled);
            CollectionAssert.AreNotEqual(source, shuffled);
        }
Ejemplo n.º 2
0
 public void WhenSourceCollectionIsNullThenShuffleShouldThrowArgumentNullException()
 {
     Assert.ThrowsException <ArgumentNullException>(() => IEnumerableUtil.Shuffle <int>(null).ToList());
 }