Exemple #1
0
        public void TestByteBackCoverterForIllegal(string inputValue, string format)
        {
            var varInfo = new ByteDataValue(new DataValue(new Variant((byte)0)));

            varInfo.FormatSelectedItem = format;
            Assert.ThrowsException <OverflowException>(() => varInfo.ConvertValueBack(inputValue));
        }
Exemple #2
0
        public void TestByteBackCoverter(string inputValue, string format, byte expectedDisplayValue)
        {
            var varInfo = new ByteDataValue(new DataValue(new Variant((byte)0)));

            varInfo.FormatSelectedItem = format;
            varInfo.ConvertValueBack(inputValue);
            Assert.AreEqual(varInfo.GetRawValue(), expectedDisplayValue);
        }