Exemplo n.º 1
0
        public void NumberVar_Negative_Test_SetValue_Float()
        {
            //Arrange
            VariableNumber variableNumber = new VariableNumber();

            variableNumber.Name           = "test";
            variableNumber.Value          = "99.99";
            variableNumber.IsDecimalValue = true;
            variableNumber.MinValue       = "-100.60";
            variableNumber.MaxValue       = "100.55";

            //Act
            var result = variableNumber.SetValue("123.3");

            //Assert
            Assert.AreEqual(false, result);
        }
Exemplo n.º 2
0
        public void NumberVar_Test_SetValue_Int()
        {
            //Arrange
            VariableNumber variableNumber = new VariableNumber();

            variableNumber.Name           = "test";
            variableNumber.Value          = "99";
            variableNumber.IsDecimalValue = false;
            variableNumber.MinValue       = "-100";
            variableNumber.MaxValue       = "100";

            //Act
            var result = variableNumber.SetValue("66");

            //Assert
            Assert.AreEqual(true, result);
        }