public void Should_publish_products_and_add_of_two_for_each_price() { var allUnderlyings = MockAllUnderlyings(); var pricePublicher = MockPricePublicher(); const int basePrice = 1; var marketDataRetriever = MockMarketDataRetriever(basePrice); const int addPrice = 2; var massPricerPublisher = new MassPricerPublisher(allUnderlyings); massPricerPublisher.PriceAndPublishEverything(pricePublicher, marketDataRetriever); pricePublicher.Received().Publish(basePrice + addPrice); }
public void Should_return_underlying_start_with_C_letter() { var allUnderlyings = MockAllUnderlyings(); var pricePublicher = MockPricePublicher(); var marketDataRetriever = Substitute.For<IMarketDataRetriever>(); var productCount = _products.Count(n => n.StartsWith("C")); var massPricerPublisher = new MassPricerPublisher(allUnderlyings); massPricerPublisher.PriceAndPublishEverything(pricePublicher, marketDataRetriever); marketDataRetriever.Received(productCount).GetClose(Arg.Any<string>()); }
public void Should_return_underlying_start_with_C_letter() { var allUnderlyings = MockAllUnderlyings(); var pricePublicher = MockPricePublicher(); var marketDataRetriever = Substitute.For <IMarketDataRetriever>(); var productCount = _products.Count(n => n.StartsWith("C")); var massPricerPublisher = new MassPricerPublisher(allUnderlyings); massPricerPublisher.PriceAndPublishEverything(pricePublicher, marketDataRetriever); marketDataRetriever.Received(productCount).GetClose(Arg.Any <string>()); }
static void Main(string[] args) { var massPricerPublisher = new MassPricerPublisher(); massPricerPublisher.PriceAndPublishEverything(); }