public void ShouldReturnAMaleName(int iterations)
 {
     while (iterations-- > 0)
     {
         var name = RandomNameGenerator.GetFirstName(100M);
         Assert.Contains(name, MaleNamesCollection.Names);
     }
 }
Example #2
0
 public void ShouldReturnMaleForTheFirst50Percent()
 {
     for (var i = 0; i <= 0xFF; i++)
     {
         // Jcl: The default test generator uses a random byte (0-256) and normalizes it to 0..1 to get the probability
         _mockRandomGenerator.SetNextByte((byte)i);
         var name = _nameGenerator.GetFirstName(50);
         Assert.Contains(name, i < 128 ? _maleNamesForAssert.Names : _femaleNamesForAssert.Names);
     }
 }