Пример #1
0
        public void TestUInt32BackCoverterForIllegal(string inputValue, string format)
        {
            var varInfo = new UInt32VariableInfo();

            varInfo.FormatSelectedItem = format;
            var wVal = varInfo.Value;

            Assert.ThrowsException <OverflowException>(() => wVal.ConvertBack(inputValue));
        }
Пример #2
0
        public void TestUInt32BackCoverter(string inputValue, string format, UInt32 expectedDisplayValue)
        {
            var varInfo = new UInt32VariableInfo();

            varInfo.FormatSelectedItem = format;
            var wVal    = varInfo.Value;
            var convVal = (WrappedValue <UInt32>)wVal.ConvertBack(inputValue);

            Assert.AreEqual(convVal.Value, expectedDisplayValue);
        }
Пример #3
0
        public void TestUInt32Coverter(UInt32 inputValue, string format, string expectedDisplayValue)
        {
            var varInfo = new UInt32VariableInfo();

            varInfo.FormatSelectedItem = format;
            var wVal = varInfo.Value;

            wVal.Value = inputValue;
            var convVal = wVal.Convert();

            Assert.AreEqual(convVal, expectedDisplayValue);
        }