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

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

            // Assert
            result.Should().Be(value);
            stream.Offset.Should().Be(sizeof(ushort));
        }
예제 #2
0
 protected override ushort DeserializeInternal(DeserializationStream stream, Type sourceType)
 {
     return(stream.ReadUShort());
 }