Exemple #1
0
 protected void UpdateTexts()
 {
     assetsText.text    = assets.ToString("F2");
     valuationText.text = (assets * priceSystem.GetPrice()).ToString("F2");
     priceText.text     = priceSystem.GetPrice().ToString("F2");
     UpdatePercentage();
     UpdateLevelText();
 }
Exemple #2
0
        public void Should_ReturnCorrectPriceForProduct(char item, int expectedPrice)
        {
            // Arrange
            var priceSystem = new PriceSystem();

            // Act
            int itemPrice = priceSystem.GetPrice(item);

            // Assert
            Assert.AreEqual(expectedPrice, itemPrice);
        }