public void Serialize_Wrong_Type_Throws() { // arrange var type = new MultiplierPathType(); object input = 123456; // act // assert Assert.Throws <ScalarSerializationException>( () => type.Serialize(input)); }
public void Serialize_Null() { // arrange var type = new MultiplierPathType(); // act object serializedValue = type.Serialize(null); // assert Assert.Null(serializedValue); }
public void Serialize_Type() { // arrange var type = new MultiplierPathType(); MultiplierPathString input = "_123456"; // act object serializedValue = type.Serialize(input); // assert Assert.IsType <string>(serializedValue); Assert.Equal("_123456", serializedValue); }