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; } } } }
public async Task CreateRunners() { var runners = _generator.Generate(5000); var mappedRunners = _mapper.Map <RunnerEntity[]>(runners); await _repository.Save(mappedRunners); }
public void GenerateShouldGenerateRunners() { var runners = _runnerGenerator.Generate(2); Assert.Equal(2, runners.Count()); }