Пример #1
0
        public void ShouldGetGetPriceWithTax()
        {
            var fruit = new BaseFruit(2.5, 12, "someFruit", "black", 10);

            var actualTaxedPrice = fruit.GetPriceWithTax(2.5);

            Assert.AreEqual(35, actualTaxedPrice);
            Assert.That(actualTaxedPrice, Is.EqualTo(35));
        }
        public void GetPriceWithTax_PriceAndTax()
        {
            double expected = 5.5;
            double actual;

            BaseFruit baseFruitAmount = new BaseFruit(4.5, 100, "carrot", "orange", 5);

            actual = baseFruitAmount.GetPriceWithTax(0.1);

            NUnit.Framework.Assert.AreEqual(expected, actual, $"Expected result is {0}, but actual result was {1}");
        }