コード例 #1
0
        public void CheckReadWriteUInt64ReturnsSameValue(ulong value, ByteOrder byteOrder)
        {
            using (var baseStream = new MemoryStream())
            {
                var constructWriter = new ConstructWriterStream(baseStream);
                constructWriter.WriteUInt64(value, byteOrder);

                baseStream.Seek(0, SeekOrigin.Begin);

                var constructReader = new ConstructReaderStream(baseStream);
                var result = constructReader.ReadUInt64(byteOrder);

                Assert.AreEqual(value, result);
            }
        }
コード例 #2
0
        public void ReadULongIsCorrectValue(ulong value, ByteOrder byteOrder)
        {
            var constructStream = new ConstructReaderStream(DataStream.Create(value, byteOrder));

            Assert.AreEqual(value, constructStream.ReadUInt64(byteOrder));
        }