Beispiel #1
0
        public void FillUInt32Array_ShouldProduceDesiredResults_ForUnboundedInvocation()
        {
            // Arrange.
            var arrayLength = 90;
            var array       = new UInt32[arrayLength];

            using (var randomNumberGenerator = RandomNumberGenerator.Create())
            {
                // Act.
                randomNumberGenerator.FillUInt32Array(array);

                // Assert.
                array.Length.Should().Be(arrayLength);
                array.GroupBy(value => value).Any(group => group.Count() > 4).Should().BeFalse();
            }
        }