Akka.Streams.Tests.Dsl.FlowGroupedWithinSpec.A_GroupedWithin_must_group_with_rest C# (CSharp) Method

A_GroupedWithin_must_group_with_rest() private method

private A_GroupedWithin_must_group_with_rest ( ) : void
return void
        public void A_GroupedWithin_must_group_with_rest()
        {
            var random = new Random();
            Func<Script<int, IEnumerable<int>>> script = () =>
            {
                var i = random.Next();
                var rest = Tuple.Create<ICollection<int>, ICollection<IEnumerable<int>>>(new[] {i}, new[] {new[] {i}});

                return Script.Create(RandomTestRange(Sys).Select(_ =>
                {
                    var x = random.Next();
                    var y = random.Next();
                    var z = random.Next();

                    return Tuple.Create<ICollection<int>, ICollection<IEnumerable<int>>>(new[] { x, y, z },
                        new[] { new[] { x, y, z }});
                }).Concat(rest).ToArray());
            };

            RandomTestRange(Sys)
                .ForEach(_ => RunScript(script(), Settings, flow => flow.GroupedWithin(3, TimeSpan.FromMinutes(10))));
        }
    }