Пример #1
0
        public static List <AddressDTO> GetSeededAddressDTOs(int amount)
        {
            var addresses = new List <AddressDTO>();

            for (int i = 0; i < amount; i++)
            {
                addresses.Add(DbPOCOGenerator.GenerateAddressDTO(i + 1));
            }
            return(addresses);
        }
Пример #2
0
        public static List <TicketDTO> GetSeededTicketDTOs(int amount, List <StateDTO> states, List <SubprocessDTO> subprocesses)
        {
            var ticketDTOs = new List <TicketDTO>();

            for (int i = 0; i < amount; i++)
            {
                ticketDTOs.Add(DbPOCOGenerator.GenerateTicketDTO(i + 1, states[i].StateID, subprocesses[i].SubprocessID));
            }

            return(ticketDTOs);
        }
Пример #3
0
        public static List <SubprocessDTO> GetSeededSubprocessDTOs(int amount, List <ProcessDTO> processes, List <TeamDTO> teams)
        {
            var subprocessDTOs = new List <SubprocessDTO>();

            for (int i = 0; i < amount; i++)
            {
                subprocessDTOs.Add(DbPOCOGenerator.GenerateSubprocessDTO(i + 1, processes[i].ProcessID, teams[i].TeamID));
            }

            return(subprocessDTOs);
        }
Пример #4
0
        public static List <ProcessDTO> GetSeededProcessDTOs(int amount)
        {
            var processDTOs = new List <ProcessDTO>();

            for (int i = 0; i < amount; i++)
            {
                processDTOs.Add(DbPOCOGenerator.GenerateProcessDTO(i + 1));
            }

            return(processDTOs);
        }
Пример #5
0
        public static List <StateDTO> GetSeededStateDTOs(int amount)
        {
            var stateDTOs = new List <StateDTO>();

            for (int i = 0; i < amount; i++)
            {
                stateDTOs.Add(DbPOCOGenerator.GenerateStateDTO(i + 1));
            }

            return(stateDTOs);
        }
Пример #6
0
        public static List <EmployeeTeamDTO> GetSeededEmployeeTeamDTOs(int amount, List <EmployeeDTO> emps, List <TeamDTO> teams)
        {
            var empTeamDTOs = new List <EmployeeTeamDTO>();

            for (int i = 0; i < amount; i++)
            {
                empTeamDTOs.Add(DbPOCOGenerator.GenerateEmployeeTeamDTO(i + 1, emps[i].EmployeeID, teams[i].TeamID));
            }

            return(empTeamDTOs);
        }
Пример #7
0
        public static List <TeamDTO> GetSeededTeamDTOs(int amount)
        {
            var teamDTOs = new List <TeamDTO>();

            for (int i = 0; i < amount; i++)
            {
                teamDTOs.Add(DbPOCOGenerator.GenerateTeamDTO(i + 1));
            }

            return(teamDTOs);
        }
Пример #8
0
        public static List <EmployeeDTO> GetSeededEmployeeDTOs(int amount, List <AddressDTO> addresses, List <RoleDTO> roles)
        {
            var employeeDTOs = new List <EmployeeDTO>();

            for (int i = 0; i < amount; i++)
            {
                employeeDTOs.Add(DbPOCOGenerator.GenerateEmployeeDTO(i + 1, addresses[i].AddressID, roles[i].RoleID));
            }

            return(employeeDTOs);
        }
Пример #9
0
        public static List <Ticket> GetSeededTickets(int amount, List <State> states, List <Subprocess> subprocesses)
        {
            var tickets = new List <Ticket>();

            for (int i = 0; i < amount; i++)
            {
                tickets.Add(DbPOCOGenerator.GenerateTicket(i + 1, states[i], subprocesses[i]));
            }

            return(tickets);
        }
Пример #10
0
        public static List <ParentChildRelation> GetSeededParentChildRelations(int amount, List <Subprocess> children, List <Subprocess> parents)
        {
            var parentChildRelations = new List <ParentChildRelation>();

            for (int i = 0; i < amount; i++)
            {
                parentChildRelations.Add(DbPOCOGenerator.GenerateParentChildRelation(i + 1, children[i], parents[i]));
            }

            return(parentChildRelations);
        }
Пример #11
0
        public static List <Subprocess> GetSeededSubprocesses(int amount, List <Process> processes, List <Team> teams)
        {
            var subprocesses = new List <Subprocess>();

            for (int i = 0; i < amount; i++)
            {
                subprocesses.Add(DbPOCOGenerator.GenerateSubprocess(i + 1, processes[i], teams[i]));
            }

            return(subprocesses);
        }
Пример #12
0
        public static List <EmployeeTeam> GetSeededEmployeeTeams(int amount, List <Employee> emps, List <Team> teams)
        {
            var empTeams = new List <EmployeeTeam>();

            for (int i = 0; i < amount; i++)
            {
                empTeams.Add(DbPOCOGenerator.GenerateEmployeeTeam(i + 1, emps[i], teams[i]));
            }

            return(empTeams);
        }
Пример #13
0
        public static List <Employee> GetSeededEmployees(int amount, List <Address> addresses, List <Role> roles)
        {
            var employees = new List <Employee>();

            for (int i = 0; i < amount; i++)
            {
                employees.Add(DbPOCOGenerator.GenerateEmployee(i + 1, addresses[i], roles[i]));
            }

            return(employees);
        }
Пример #14
0
        public static List <RoleDTO> GetSeededRoleDTOs(int amount)
        {
            var roles = new List <RoleDTO>();

            roles.Add(DbPOCOGenerator.GenerateRoleDTO(1, "Employee"));
            roles.Add(DbPOCOGenerator.GenerateRoleDTO(2, "Admin"));
            for (int i = 3; i < amount + 1; i++)
            {
                roles.Add(DbPOCOGenerator.GenerateRoleDTO(3, "Other" + i));
            }

            return(roles);
        }
Пример #15
0
        public static List <ParentChildRelationDTO> GetSeededParentChildRelationDTOs(int amount, List <SubprocessDTO> children, List <SubprocessDTO> parents)
        {
            var parentChildRelationDTOs = new List <ParentChildRelationDTO>();

            for (int i = 0; i < amount; i++)
            {
                parentChildRelationDTOs.Add(DbPOCOGenerator.GenerateParentChildRelationDTO(
                                                i + 1,
                                                (children[i] != null) ? children[i].SubprocessID : -1,
                                                (parents[i] != null) ? parents[i].SubprocessID : -1));
            }

            return(parentChildRelationDTOs);
        }