IEnumerable<SampleRunData> BuildOutVendors() { var vendors = new[] { "tucker-rocky", "helmet-house", "MAG", "FOX", "WPS" }; foreach (var vendor in vendors) { var bias = (vendor.GetHashCode()/int.MaxValue); var e = new RandomQuantities(0,10,bias); var rt = new RandomQuantities(100,1000,900); var rr = new RandomQuantities(900,2000,1400); foreach (var day in Enumerable.Range(0, _days)) { var errors = e.Next(); yield return new SampleRunData() { ErrorCount = errors, RunDate = DateTime.Today.AddDays(day), RunTimeInSeconds = rt.Next(), SuccessCount = 1000 - errors, Vendor = vendor }; } } }
IEnumerable<SampleOrderData> BuildOutFakeSales() { var brands = new[] {"JPC", "MSS"}; foreach (var brand in brands) { var rm = new RandomMoneyAmounts(50, 250, 200); var ro = new RandomQuantities(10, 1000, 600); var li = new RandomQuantities(1, 4, 2); var t = new RandomQuantities(100, 300, 120); foreach (var i in Enumerable.Range(0, _days)) { var x = ro.Next(); foreach (var j in Enumerable.Range(0, x)) { yield return new SampleOrderData { Brand = brand, Amount = rm.Next(), LineItems = li.Next(), OrderedOn = DateTime.Today.AddDays(i), ProcessingTime = t.Next() }; } } } }