Пример #1
0
        public void FloatCanBeReaded(float value)
        {
            // Arrange
            var data = BitConverter.GetBytes(value);

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

            // Assert
            result.Should().Be(value);
            stream.Offset.Should().Be(sizeof(float));
        }
Пример #2
0
 protected override float DeserializeInternal(DeserializationStream stream, Type sourceType)
 {
     return(stream.ReadFloat());
 }