public void TestGivePriceFromPcPart() { //Act decimal price = Convert.ToDecimal(_logic .GetPrices(new List <PcPart> { _motherboard }, new List <Website> { _website }).First().PriceList.First().Price); //Assert Assert.IsTrue(price > 0, "The price is greater than zero so it found the website and the product on that website"); }
public IActionResult Result() { var websites = _pcBuildLogic.GetWebsites(); IEnumerable <Result> pcParts = _pcBuildLogic.GetPrices(GetSelectedPcParts(), websites); var model = new PcBuildResultViewModel { PcParts = pcParts, BestOption = _pcBuildLogic.CheckBestPriceOption(pcParts.AsList()) }; return(View(model)); }