コード例 #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!");
        }
コード例 #2
0
        public void NegativeConcentration()
        {
            // Arrange
            Ingredient ingredient = new Ingredient(1, -1);

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

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

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

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