Exemplo n.º 1
0
        public void BinaryNotationCtor()
        {
            var name = "Двоичная";

            INotation notation = new BinaryNotation();

            Assert.IsNotNull(notation);
            Assert.AreEqual(name, notation.Name);
        }
Exemplo n.º 2
0
        public void SetValueIntInput()
        {
            int       value    = 2;
            string    sValue   = "10";
            INotation notation = new BinaryNotation();

            notation.SetValue(value);

            Assert.AreEqual(value, notation.ValueInt);
            Assert.AreEqual(sValue, notation.ValueString);
        }
Exemplo n.º 3
0
        public void SetValueTestStringInputWrong()
        {
            int       value    = 2;
            string    sValue   = "X10";
            INotation notation = new BinaryNotation();

            bool result = notation.SetValue(sValue);

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