Exemplo n.º 1
0
        public void TestInt64BackCoverterForIllegal(string inputValue, string format)
        {
            var varInfo = new Int64VariableInfo();

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

            Assert.ThrowsException <OverflowException>(() => wVal.ConvertBack(inputValue));
        }
Exemplo n.º 2
0
        public void TestInt64BackCoverter(string inputValue, string format, Int64 expectedDisplayValue)
        {
            var varInfo = new Int64VariableInfo();

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

            Assert.AreEqual(convVal.Value, expectedDisplayValue);
        }
Exemplo n.º 3
0
        public void TestInt64Coverter(Int64 inputValue, string format, string expectedDisplayValue)
        {
            var varInfo = new Int64VariableInfo();

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

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

            Assert.AreEqual(convVal, expectedDisplayValue);
        }