public void ShouldGetTotalWeight() { var fruit = new BaseFruit(2.5, 12, "someFruit", "black", 10); var actualPriceByWeight = fruit.GetTotalWeight(); Assert.AreEqual(actualPriceByWeight, 30); }
public void GetTotalWeight_AmountAndWeight() { double expected = 450; double actual; BaseFruit baseFruitAmount = new BaseFruit(4.5, 100, "carrot", "orange", 5); actual = baseFruitAmount.GetTotalWeight(); NUnit.Framework.Assert.AreEqual(expected, actual, $"Expected result is {0}, but actual result was {1}"); }