Exemple #1
0
        public void TestUInt32BackCoverterForIllegal(string inputValue, string format)
        {
            var varInfo = new UInt32DataValue(new DataValue(new Variant((UInt32)0)));

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

            varInfo.FormatSelectedItem = format;
            varInfo.ConvertValueBack(inputValue);
            Assert.AreEqual(varInfo.GetRawValue(), expectedDisplayValue);
        }
Exemple #3
0
        public void TestUInt32Coverter(UInt32 inputValue, string format, string expectedDisplayValue)
        {
            var varInfo = new UInt32DataValue(new DataValue(new Variant(inputValue)));

            varInfo.FormatSelectedItem = format;
            var convVal = varInfo.ConvertValue();

            Assert.AreEqual(convVal, expectedDisplayValue);
        }