public void TestGetPrice_ReturnsValue(string instrumentName) { //Act var instrumentPrice = myTestee.GetPrice(instrumentName); //Assert Assert.IsTrue(instrumentPrice > 0); Assert.IsTrue(instrumentPrice < 100); }
//<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)); } } } }