Пример #1
0
        public void WriteReadShortArray()
        {
            var ndw = new NetDataWriter();

            ndw.PutArray(new short[] { 1, 2, 3, 4, 5, 6, short.MaxValue, short.MinValue });

            var ndr            = new NetDataReader(ndw.Data);
            var readShortArray = ndr.GetShortArray();

            Assert.That(
                new short[] { 1, 2, 3, 4, 5, 6, short.MaxValue, short.MinValue },
                Is.EqualTo(readShortArray).AsCollection);
        }