コード例 #1
0
        public void TestPackedLengthOdd()
        {
            var formatter = new BcdFormatter();

            Assert.AreEqual(1, formatter.GetPackedLength(1));
            Assert.AreEqual(2, formatter.GetPackedLength(3));
            Assert.AreEqual(3, formatter.GetPackedLength(5));
        }
コード例 #2
0
        public void TestPackedLength()
        {
            IFormatter formatter = new BcdFormatter();
            var        actual    = formatter.GetPackedLength(8);

            Assert.AreEqual(4, actual);
        }