public void ReadInt64(long input)
        {
            Reset();
            _writer.Write(input);

            var val = _bufferReader.ReadInt64();

            Assert.Equal(input, val);
        }
Exemple #2
0
        public void TrySerialize_should_correctly_serialize_record_given_sufficient_memory()
        {
            serializer.TrySerialize(item, itemSerializer, timestamp, buffer).Should().BeTrue();

            var reader = new BinaryBufferReader(buffer.InternalBuffer, 0);

            reader.ReadInt64().Should().Be(timestamp.ToUniversalTime().ToUnixTimeMilliseconds());
            reader.ReadInt32().Should().Be(10);
            reader.ReadString().Should().Be(item);
        }