public void IsGetFormattedTaxedPriceReturnsCorrectly() { var shirt = new Shirt { Price = 10F, Tax = 1.2F }; var taxedPrice = shirt.GetFormattedTaxedPrice(); Assert.AreEqual("$12.00", taxedPrice); }
public void IsGetFormattedTaxedPriceReturnsCorrectly() { Shirt shirt = new Shirt { Price = 10F }; string taxedPrice = shirt.GetFormattedTaxedPrice(1.2F); Assert.AreEqual("$12.00", taxedPrice); }
public IActionResult AddShirt(Shirt shirt) { _repository.AddShirt(shirt); _logger.LogDebug($"A {shirt.Color.ToString()} shirt of size {shirt.Size.ToString()} with a price of {shirt.GetFormattedTaxedPrice()} was added successfully."); return(RedirectToAction("Index")); }