public void TestStartMonitoring_ReceivesPriceNotifications()
        {
            //Arrange
            myTestee.Start();

            //Act
            myTestee.StartMonitoring(new List <string>()
            {
                "a"
            });
            System.Threading.Thread.Sleep(myUpdateInterval * 3);

            //Assert
            Assert.NotNull(myReceivedInstrumentPrices);
            Assert.IsTrue(myReceivedInstrumentPrices.ToList().ToDictionary(x => x.Key, x => x.Value).ContainsKey("a"));
            Assert.AreEqual(1, myReceivedInstrumentPrices.ToList().Count); //Should contain only one item
        }
Beispiel #2
0
        private void StartMonitor()
        {
            myIsMonitorStarted = true;

            // Start the engine
            myPricingEngine.Start();
            myPricingEngine.InstrumentPricesChanged += OnInstrumentPricesChanged;
        }