コード例 #1
0
        public void Byte()
        {
            IByteMethods<byte> methods =
                                        new Edu.Wisc.Forest.Flel.Util.ByteMethods.Byte();
            byte origValue = (byte) 123;
            byte[] bytes = methods.ToBytes(origValue);
            Assert.AreEqual(bytes.Length, sizeof(byte));
            Assert.AreEqual(origValue, bytes[0]);

            byte fromMthdResult = methods.FromBytes(bytes, 0);
            Assert.AreEqual(origValue, fromMthdResult);
        }
コード例 #2
0
        public void Byte()
        {
            IByteMethods <byte> methods =
                new Edu.Wisc.Forest.Flel.Util.ByteMethods.Byte();
            byte origValue = (byte)123;

            byte[] bytes = methods.ToBytes(origValue);
            Assert.AreEqual(bytes.Length, sizeof(byte));
            Assert.AreEqual(origValue, bytes[0]);

            byte fromMthdResult = methods.FromBytes(bytes, 0);

            Assert.AreEqual(origValue, fromMthdResult);
        }