private void OnTimedEvent(Object source, ElapsedEventArgs e) { // Choix aléatoire d'un instrument dans le repository string randomKey = GetRandomInstrumentKey(_rand); double randPrice = 100.0 * _rand.NextDouble(); _instrumentRepository.PriceUpdate(randomKey, randPrice); }
public void TestPriceUpdate(string key, double price) { _repository.Init(5000); _repository.PriceUpdate(key, price); Assert.AreEqual(_repository.GetInstrument(key).Price, 100.0); }