Ejemplo n.º 1
0
 public static Office GenerateOffice(int employeeCount, int taskCount)
 {
     var office = new Office { Id = GenerateId(), Address = GenerateString() };
     while (employeeCount-- > 0)
     {
         office.Employees.Add(GenerateEmployee(office, taskCount));
     }
     return office;
 }
Ejemplo n.º 2
0
 private static Employee GenerateEmployee(Office office, int taskCount)
 {
     var employee = new Employee { Id = GenerateId(), Name = GenerateString(), Office = office };
     while (taskCount-- > 0)
     {
         employee.Tasks.Add(GenerateTask(employee));
     }
     return employee;
 }