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); }
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); } }
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); }