Пример #1
0
        public static List <TripStream> RandomStreams(int number)
        {
            var list = new List <TripStream>();

            for (var i = 0; i < number; i++)
            {
                var stream = new TripStream();
                list.Add(stream);
            }

            return(list);
        }
Пример #2
0
        public void UseMixOfTenants(int numberOfStreams)
        {
            NumberOfStreams = numberOfStreams;

            foreach (var stream in _streams.ToArray())
            {
                stream.TenantId = "a";
                var other = new TripStream
                {
                    TenantId = "b",
                    StreamId = stream.StreamId
                };

                _streams.Add(other);
            }
        }
Пример #3
0
        public static Travel Random(int day)
        {
            var travel = new Travel {
                Day = day,
            };

            var length = TripStream.Random.Next(1, 20);

            for (var i = 0; i < length; i++)
            {
                var movement = new Movement
                {
                    Direction = TripStream.RandomDirection(), Distance = TripStream.Random.NextDouble() * 100
                };

                travel.Movements.Add(movement);
            }

            return(travel);
        }