Exemple #1
0
        public void NaNUnknownConcentration()
        {
            // Arrange
            Ingredient ingredient = new Ingredient(1, 100, false, true);

            // Act
            bool isValid = Calculator.IsConcentrationValid(ingredient);

            // Assert
            Assert.True(isValid, "Validation error!");
        }
Exemple #2
0
        public void NegativeConcentration()
        {
            // Arrange
            Ingredient ingredient = new Ingredient(1, -1);

            // Act
            bool isValid = Calculator.IsConcentrationValid(ingredient);

            // Assert
            Assert.False(isValid, "Validation error!");
        }
Exemple #3
0
        public void ZeroConcentration()
        {
            // Arrange
            Ingredient ingredient = new Ingredient(1, 0);

            // Act
            bool isValid = Calculator.IsConcentrationValid(ingredient);

            // Assert
            Assert.True(isValid, "Validation error!");
        }