private static void RoundTripInt16(short num, params byte[] bytes) { byte[] buffer = NetworkOrderBitsConverter.GetBytes(num); Assert.Equal(2, buffer.Length); Assert.Equal(bytes, buffer); Assert.Equal(num, NetworkOrderBitsConverter.ToInt16(buffer)); NetworkOrderBitsConverter.PutInt16(num, buffer); Assert.Equal(bytes, buffer); Assert.Equal(num, NetworkOrderBitsConverter.ToInt16(buffer)); }