Example #1
0
        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);
        }
Example #2
0
        public void ShouldConvertToDecimal(string value, decimal expected)
        {
            var dec = new TpsDecimal(value);

            Assert.AreEqual(expected, ((IConvertible <decimal>)dec).AsType());
        }
Example #3
0
        public void ShouldReadFromString(string value)
        {
            var dec = new TpsDecimal(value);

            Assert.AreEqual(value, dec.Value);
        }