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; }
public string GetRandomName(decimal maleProbabilityPercent, INameList nameListMale, INameList nameListFemale) { var list = RandomMeetsProbabilityPercent(maleProbabilityPercent) ? nameListMale : nameListFemale; return(list.Names[_randomGenerator.NextRandomInt() % list.Names.Length]); }
public string GetRandomName(INameList nameList) { return(nameList.Names[_randomGenerator.NextRandomInt() % nameList.Names.Length]); }
public NameListForm() { InitializeComponent(); nameList = new NameList(); }