public void ShouldReadFromRandomAccess(string value, int bcdLength, int bcdDigitsAfterDecimal, byte[] data) { var rx = new RandomAccess(data); var dec = new TpsDecimal(rx, bcdLength, bcdDigitsAfterDecimal); Assert.AreEqual(value, dec.Value); }
public void ShouldConvertToDecimal(string value, decimal expected) { var dec = new TpsDecimal(value); Assert.AreEqual(expected, ((IConvertible <decimal>)dec).AsType()); }
public void ShouldReadFromString(string value) { var dec = new TpsDecimal(value); Assert.AreEqual(value, dec.Value); }