public void DeserializeGuid() { Assert.True(SystemTypeKeySerializer <Guid> .CanSerialize); var value = new Guid("b2eb9f9a-a397-49d8-93b0-c0fe636ff569"); var result = SystemTypeKeySerializer <Guid> .Deserialize("b2eb9f9a-a397-49d8-93b0-c0fe636ff569"); Assert.Equal(value, result); }
public void DeserializeDateTime() { Assert.True(SystemTypeKeySerializer <DateTime> .CanSerialize); var value = new DateTime(636670718103940161); var result = SystemTypeKeySerializer <DateTime> .Deserialize("636670718103940161"); Assert.Equal(value, result); }
public void DeserializeTimeSpan() { Assert.True(SystemTypeKeySerializer <TimeSpan> .CanSerialize); var value = new TimeSpan(1234567890); var result = SystemTypeKeySerializer <TimeSpan> .Deserialize("1234567890"); Assert.Equal(value, result); }
public void DeserializeString() { Assert.True(SystemTypeKeySerializer <String> .CanSerialize); var inValue = "Konnichiwa"; var result = SystemTypeKeySerializer <String> .Deserialize(inValue); Assert.Equal(inValue, result); Assert.Same(inValue, result); }