コード例 #1
0
        public void SetPriceWithNegativeValue()
        {
            float price = -10;
            var   model = new HomePageVM();

            Assert.ThrowsException <ArgumentException>(() => model.SetPrice(price));
        }
コード例 #2
0
        public void SetPriceWithPositiveValue()
        {
            float price = 10;
            var   model = new HomePageVM();

            model.SetPrice(10);
            Assert.AreEqual($"Cena za kilogram: {price}", model.PricePerKgInfo);
        }