public void IncludeAndCount()
 {
     var generator = new RandomValueGenerator();
     {
         generator.DefaultCharsToInclude = RandomValueGenerator.CharsToInclude.Space;
         for (uint count = 100; count < 400; ++count)
         {
             generator.DefaultCharListCount = count;
             var list = generator.Chars();
             Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(count, (uint) list.Length, count.ToString(CultureInfo.InvariantCulture));
             ValidateChars(list, CharTypesAllowed.Space);
         }
     }
     {
         generator.DefaultCharsToInclude = RandomValueGenerator.CharsToInclude.AlphaNumeric;
         for (uint count = 100; count < 400; ++count)
         {
             generator.DefaultCharListCount = count;
             var list = generator.Chars();
             Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(count, (uint) list.Length, count.ToString(CultureInfo.InvariantCulture));
             ValidateChars(list, CharTypesAllowed.Upper | CharTypesAllowed.Lower | CharTypesAllowed.Digit);
         }
     }
 }
 public void Include()
 {
     var generator = new RandomValueGenerator();
     {
         generator.DefaultCharsToInclude = RandomValueGenerator.CharsToInclude.Space;
         var list = generator.Chars(_count);
         ValidateChars(list, CharTypesAllowed.Space);
     }
     {
         generator.DefaultCharsToInclude = RandomValueGenerator.CharsToInclude.Digits;
         var list = generator.Chars(_count);
         ValidateChars(list, CharTypesAllowed.Digit);
     }
     {
         generator.DefaultCharsToInclude = RandomValueGenerator.CharsToInclude.Uppercase;
         var list = generator.Chars(_count);
         ValidateChars(list, CharTypesAllowed.Upper);
     }
     {
         generator.DefaultCharsToInclude = RandomValueGenerator.CharsToInclude.LowerCase;
         var list = generator.Chars(_count);
         ValidateChars(list, CharTypesAllowed.Lower);
     }
     {
         generator.DefaultCharsToInclude = RandomValueGenerator.CharsToInclude.Symbols;
         var list = generator.Chars(_count);
         ValidateChars(list, CharTypesAllowed.Symbol);
     }
     {
         generator.DefaultCharsToInclude = RandomValueGenerator.CharsToInclude.Letters;
         var list = generator.Chars(_count);
         ValidateChars(list, CharTypesAllowed.Upper | CharTypesAllowed.Lower);
     }
     {
         generator.DefaultCharsToInclude = RandomValueGenerator.CharsToInclude.AlphaNumeric;
         var list = generator.Chars(_count);
         ValidateChars(list, CharTypesAllowed.Upper | CharTypesAllowed.Lower | CharTypesAllowed.Digit);
     }
     {
         generator.DefaultCharsToInclude = RandomValueGenerator.CharsToInclude.All;
         var list = generator.Chars(_count);
         ValidateChars(list,
                       CharTypesAllowed.Upper | CharTypesAllowed.Lower | CharTypesAllowed.Digit | CharTypesAllowed.Symbol | CharTypesAllowed.Space);
     }
 }
 public void Count()
 {
     var generator = new RandomValueGenerator();
     for (uint count = 0; count < 100; ++count)
     {
         generator.DefaultCharListCount = count;
         var list = generator.Chars(RandomValueGenerator.CharsToInclude.All);
         Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(count, (uint) list.Length, count.ToString(CultureInfo.InvariantCulture));
     }
 }
 public void IncludeDefault()
 {
     var generator = new RandomValueGenerator();
     var list = generator.Chars(_count);
     Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(_count, (uint) list.Length);
     ValidateChars(list,
                   CharTypesAllowed.Upper | CharTypesAllowed.Lower | CharTypesAllowed.Digit | CharTypesAllowed.Symbol | CharTypesAllowed.Space);
 }
 public void IncludeAlphanumeric()
 {
     var generator = new RandomValueGenerator();
     var list = generator.Chars(RandomValueGenerator.CharsToInclude.AlphaNumeric, _count);
     Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(_count, (uint) list.Length);
     ValidateChars(list, CharTypesAllowed.Upper | CharTypesAllowed.Lower | CharTypesAllowed.Digit);
 }
 public void IncludeSymbol()
 {
     var generator = new RandomValueGenerator();
     var list = generator.Chars(RandomValueGenerator.CharsToInclude.Symbols, _count);
     Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(_count, (uint) list.Length);
     ValidateChars(list, CharTypesAllowed.Symbol);
 }
 public void Count()
 {
     var generator = new RandomValueGenerator();
     var list = generator.Chars(_count);
     Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(_count, (uint) list.Length);
 }
 public void Default()
 {
     var generator = new RandomValueGenerator();
     var obj = generator.Chars();
     Assert.That(Value.Of(obj).Is().TypeOf(typeof (char[])));
 }