예제 #1
0
        public void DoubleCanBeReaded(double value)
        {
            // Arrange
            var data = BitConverter.GetBytes(value);

            // Act
            var stream = new DeserializationStream(data);
            var result = stream.ReadDouble();

            // Assert
            result.Should().Be(value);
            stream.Offset.Should().Be(sizeof(double));
        }
 protected override double DeserializeInternal(DeserializationStream stream, Type sourceType)
 {
     return(stream.ReadDouble());
 }