public void Short() { IByteMethods<short> methods = new Edu.Wisc.Forest.Flel.Util.ByteMethods.Short(); short origValue = (short) -12345; byte[] bytes = methods.ToBytes(origValue); Assert.AreEqual(bytes.Length, sizeof(short)); short fromMthdResult = methods.FromBytes(bytes, 0); Assert.AreEqual(origValue, fromMthdResult); }
public void Short() { IByteMethods <short> methods = new Edu.Wisc.Forest.Flel.Util.ByteMethods.Short(); short origValue = (short)-12345; byte[] bytes = methods.ToBytes(origValue); Assert.AreEqual(bytes.Length, sizeof(short)); short fromMthdResult = methods.FromBytes(bytes, 0); Assert.AreEqual(origValue, fromMthdResult); }