public void GetData(TestDataEntity testData, int numberOfClientsInBrowser) { _monitor.TestDataEntities.Add(testData); _monitor.Harvested += numberOfClientsInBrowser; if (_monitor.HarvestedAll()) { Clients.All.harvestComplete(new { Duration = _monitor.Duration, StartTime = _monitor.ClientStartTime.ToMilliseconds(), SentFromClientEvents = _monitor.SentFromClientEvents, ReceivedAtServerEvents = _monitor.ReceivedAtServerEvents, SentFromServerEvents = _monitor.SentFromServerEvents, Spacing = _monitor.Spacing, TestDataEntities = _monitor.TestDataEntities }); } }
public void GetData_should_add_incoming_data_to_monitor() { var testData = new TestDataEntity { LatencyData = new List<int> {300, 300, 300} }; _loadHub.GetData(testData, 5); _monitor.TestDataEntities.ElementAt(0).Should().Be(testData); }