Beispiel #1
0
 public void Generate(int amount, params object[] parameters)
 {
     for (var i = 0; i < amount; i++)
     {
         var projectId      = _projectHandler.GetRandomProject().Id;
         var outerSubjectId = _outerSubjectHandler.GetRandomOuterSubject().Id;
         OuterProjects.Add(new OuterProject(OuterProjects.Count + 1, outerSubjectId, projectId));
     }
 }
Beispiel #2
0
        public void Generate(int amount, params object[] parameters)
        {
            if (amount <= 0)
            {
                throw new ArgumentOutOfRangeException();
            }

            var index = Supervisions.Any() ? (_projectHandler.Projects.FindAll(p => p.Status != UKONCZONY).Count - 1) : 0;
            var delta = Supervisions.Count / amount;

            for (var i = 0; i < amount; i++)
            {
                var manager = _outerSubjectHandler.GetRandomOuterSubject();
                var project = _projectHandler.Projects[index];
                CreateSupervision(manager, project);
                index += delta;
            }
        }