Example #1
0
 public BaseGeneratorTests()
 {
     _maleNamesForAssert   = new MockMaleNames();
     _femaleNamesForAssert = new MockFemaleNames();
     _mockRandomGenerator  = new SpecificRandomMocker();
     _nameGenerator        = new NameGeneratorBaseFixture(_mockRandomGenerator);
 }
 protected SpecificNameGeneratorTestsBase(IRandomNameGenerator randomNameGenerator, INameList maleNames, INameList femaleNames, INameList lastNames)
 {
     RandomNameGenerator   = randomNameGenerator;
     MaleNamesCollection   = maleNames;
     FemaleNamesCollection = femaleNames;
     LastNamesCollection   = lastNames;
 }
Example #3
0
        public string GetRandomName(decimal maleProbabilityPercent, INameList nameListMale, INameList nameListFemale)
        {
            var list = RandomMeetsProbabilityPercent(maleProbabilityPercent) ? nameListMale : nameListFemale;

            return(list.Names[_randomGenerator.NextRandomInt() % list.Names.Length]);
        }
Example #4
0
 public string GetRandomName(INameList nameList)
 {
     return(nameList.Names[_randomGenerator.NextRandomInt() % nameList.Names.Length]);
 }
 public NameListForm()
 {
     InitializeComponent();
     nameList = new NameList();
 }