public void TestInt64BackCoverterForIllegal(string inputValue, string format) { var varInfo = new Int64DataValue(new DataValue(new Variant((Int64)0))); varInfo.FormatSelectedItem = format; Assert.ThrowsException <OverflowException>(() => varInfo.ConvertValueBack(inputValue)); }
public void TestInt64BackCoverter(string inputValue, string format, Int64 expectedDisplayValue) { var varInfo = new Int64DataValue(new DataValue(new Variant((Int64)0))); varInfo.FormatSelectedItem = format; varInfo.ConvertValueBack(inputValue); Assert.AreEqual(varInfo.GetRawValue(), expectedDisplayValue); }
public void TestInt64Coverter(Int64 inputValue, string format, string expectedDisplayValue) { var varInfo = new Int64DataValue(new DataValue(new Variant(inputValue))); varInfo.FormatSelectedItem = format; var convVal = varInfo.ConvertValue(); Assert.AreEqual(convVal, expectedDisplayValue); }