Ejemplo n.º 1
0
        public void TestGetPrice_ReturnsValue(string instrumentName)
        {
            //Act
            var instrumentPrice = myTestee.GetPrice(instrumentName);

            //Assert
            Assert.IsTrue(instrumentPrice > 0);
            Assert.IsTrue(instrumentPrice < 100);
        }
Ejemplo n.º 2
0
 //<see cref = "IPricingSource.StartMonitoring" />.
 public void StartMonitoring(IList <string> instrumentSymbols)
 {
     lock (myCurrentInstrumentsWithPrices)
     {
         foreach (var instrumentSymbol in instrumentSymbols)
         {
             if (!myCurrentInstrumentsWithPrices.ContainsKey(instrumentSymbol))
             {
                 myCurrentInstrumentsWithPrices.Add(instrumentSymbol, myPricingSource.GetPrice(instrumentSymbol));
             }
         }
     }
 }