public void TestBigEndianSerializationForEveryInt16() { Byte[] buffer = new Byte[2]; for (int i = Int16.MinValue; i <= Int16.MaxValue; i++) { Int16 testValue = (Int16)i; buffer.BigEndianSetInt16(0, testValue); Assert.AreEqual((Byte)(testValue >> 8), buffer[0]); Assert.AreEqual((Byte)testValue, buffer[1]); Assert.AreEqual(testValue, buffer.BigEndianReadInt16(0)); } }