public void TestInt32BackCoverterForIllegal(string inputValue, string format) { var varInfo = new Int32VariableInfo(); varInfo.FormatSelectedItem = format; var wVal = varInfo.Value; Assert.ThrowsException <OverflowException>(() => wVal.ConvertBack(inputValue)); }
public void TestInt32BackCoverter(string inputValue, string format, Int32 expectedDisplayValue) { var varInfo = new Int32VariableInfo(); varInfo.FormatSelectedItem = format; var wVal = varInfo.Value; var convVal = (WrappedValue <Int32>)wVal.ConvertBack(inputValue); Assert.AreEqual(convVal.Value, expectedDisplayValue); }
public void TestInt32Coverter(Int32 inputValue, string format, string expectedDisplayValue) { var varInfo = new Int32VariableInfo(); varInfo.FormatSelectedItem = format; var wVal = varInfo.Value; wVal.Value = inputValue; var convVal = wVal.Convert(); Assert.AreEqual(convVal, expectedDisplayValue); }