Пример #1
0
        public void SetValueIntInput()
        {
            int       value    = 10;
            string    sValue   = "10";
            INotation notation = new DecimalNotation();

            notation.SetValue(value);

            Assert.AreEqual(value, notation.ValueInt);
            Assert.AreEqual(sValue, notation.ValueString);
        }
Пример #2
0
        public void SetValueTestStringInputWrong()
        {
            int       value    = 10;
            string    sValue   = "X10";
            INotation notation = new DecimalNotation();

            bool result = notation.SetValue(sValue);

            Assert.IsFalse(result);
            Assert.AreNotEqual(value, notation.ValueInt);
            Assert.AreNotEqual(sValue, notation.ValueString);
        }