public void Serialize_Wrong_Type_Throws() { // arrange var type = new IdType(); object input = Guid.NewGuid(); // act // assert Assert.Throws <ArgumentException>(() => type.Serialize(input)); }
public void Serialize_Null() { // arrange var type = new IdType(); // act object serializedValue = type.Serialize(null); // assert Assert.Null(serializedValue); }
public void Serialize_String() { // arrange var type = new IdType(); var input = "123456"; // act object serializedValue = type.Serialize(input); // assert Assert.IsType <string>(serializedValue); Assert.Equal("123456", serializedValue); }