Exemple #1
0
        public void Distribute()
        {
            var runners = _runnerGenerator.Generate(5000);

            foreach (var runner in runners)
            {
                foreach (var corral in CorralsFilterDictionary.Keys)
                {
                    if (CorralsFilterDictionary[corral](runner) && corral.Count < corral.MaxElements)
                    {
                        corral.Add(runner);
                        break;
                    }
                }
            }
        }
Exemple #2
0
 public async Task CreateRunners()
 {
     var runners       = _generator.Generate(5000);
     var mappedRunners = _mapper.Map <RunnerEntity[]>(runners);
     await _repository.Save(mappedRunners);
 }
Exemple #3
0
        public void GenerateShouldGenerateRunners()
        {
            var runners = _runnerGenerator.Generate(2);

            Assert.Equal(2, runners.Count());
        }