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); }
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); }