public void PersonDataGeneratorConstructorTestWithOccupationList(ICollection <string> occupations, ICollection <string> firstNamesMale, ICollection <string> firstNamesFelmale, ICollection <string> lastNames) { PersonDataGenerator pdg = new PersonDataGenerator(occupations, firstNamesMale, firstNamesFelmale, lastNames); TestHelpper.PrintPersonDataGeneratorDataLists(pdg); Assert.IsTrue(pdg.occupations != null && pdg.firstNamesMale != null && pdg.firstNamesFemale != null && pdg.lastNames != null); }
public void GetRandomPersonWithAge() { Person rndPerson = testDataGenerator.GenerateRandomPerson(age: 66); TestHelpper.PrintPersonData(rndPerson); Assert.IsTrue(rndPerson.age == 66); }
public void GenerateRandomPersonWithGenderMale() { Person person; TestContext.WriteLine("Randomized sex"); for (int i = 0; i < 10; i++) { person = testDataGenerator.GenerateRandomPerson(sex: Person.Sex.Randomize); TestHelpper.PrintPersonData(person); } TestContext.WriteLine("\nMales"); for (int i = 0; i < 10; i++) { person = testDataGenerator.GenerateRandomPerson(sex: Person.Sex.Male); TestHelpper.PrintPersonData(person); } TestContext.WriteLine("\n Females"); for (int i = 0; i < 10; i++) { person = testDataGenerator.GenerateRandomPerson(sex: Person.Sex.Female); TestHelpper.PrintPersonData(person); } }
public void GetRandomFromIListTest() { List <Person> people = testDataGenerator.GetListOfRandomPersons(100); Person rndPerson = testDataGenerator.GetRandomFromIList(people); TestHelpper.PrintPersonData(rndPerson); Assert.IsTrue(rndPerson != null && people.Count == 100); }
public void GeneratePersonWithTemplateAge() { Person templatePerson = new Person(); templatePerson.age = 88; Person people = testDataGenerator.GenerateRandomPerson(templatePerson); TestHelpper.PrintPersonData(people); Assert.IsTrue(people.age == 88); }
public void GeneratePersonsWithTemplateSex() { Person templatePerson = new Person(); templatePerson.sex = Person.Sex.Male; Person people = testDataGenerator.GenerateRandomPerson(templatePerson); TestHelpper.PrintPersonData(people); Assert.IsTrue(people.sex == Person.Sex.Male); }
public void GeneratePersonWithTemplateLastName() { Person templatePerson = new Person(); templatePerson.lastName = "Mustaine"; Person people = testDataGenerator.GenerateRandomPerson(templatePerson); TestHelpper.PrintPersonData(people); Assert.IsTrue(people.lastName == "Mustaine"); }
public void GeneratePersonWithTemplateFirstName() { Person templatePerson = new Person(); templatePerson.firstName = "Heikki"; Person people = testDataGenerator.GenerateRandomPerson(templatePerson); TestHelpper.PrintPersonData(people); Assert.IsTrue(people.firstName == "Heikki"); }
public void GenerateListOfPersons() { List <Person> people = testDataGenerator.GetListOfRandomPersons(100); foreach (Person person in people) { TestHelpper.PrintPersonData(person); } Assert.IsTrue(people.Count == 100); }
public void GenerateNumerOfRandomPersons() { Person person; for (int i = 0; i < 100; i++) { person = testDataGenerator.GenerateRandomPerson(); TestHelpper.PrintPersonData(person); } Assert.Pass(); }
public void GenerateRandomPersonInsertedLastNameTest() { List <Person> people = new List <Person>(); Person person; for (int i = 0; i < 50; i++) { person = testDataGenerator.GenerateRandomPerson(lastName: "TestLastName"); people.Add(person); TestHelpper.PrintPersonData(person); } Assert.IsTrue(people.Count == 50); }
public void GeneratePersonListWithTemplate() { Person templatePerson = new Person(); templatePerson.age = 88; templatePerson.lastName = "Mustonen"; List <Person> people = testDataGenerator.GetListOfRandomPersons(100, templatePerson); TestContext.WriteLine("\n Age should be 88 and lastName should be Mustonen"); foreach (Person person in people) { TestHelpper.PrintPersonData(person); } Assert.IsTrue(people.Count == 100); }