private static string GetProductPriceResultedFormated(IProductPriceResult result) { string formatedResult = string.Empty; if (result is KnownProductPriceResult knownProductPriceResult) { formatedResult = knownProductPriceResult.Value.ToString(); } else { formatedResult = "Unknown product"; } return(formatedResult); }
public void Render(IProductPriceResult result) { var formatedResult = GetProductPriceResultedFormated(result); Console.Write(formatedResult); }
public ProductCatalogTestDouble(IProductPriceResult productPriceResult) { _productPriceResult = productPriceResult; }
public void Render(IProductPriceResult result) { ResultToRender = result; }