public void ParseLiteral_Null_Throws() { // arrange var type = new IdType(); // act // assert Assert.Throws <ArgumentNullException>(() => type.ParseLiteral(null)); }
public void ParseLiteral_Wrong_ValueNode_Throws() { // arrange var type = new IdType(); FloatValueNode input = new FloatValueNode("123456"); // act // assert Assert.Throws <ArgumentException>(() => type.ParseLiteral(input)); }
public void ParseLiteral_Wrong_ValueNode_Throws() { // arrange var type = new IdType(); var input = new FloatValueNode("123456"); // act // assert Assert.Throws <ScalarSerializationException>( () => type.ParseLiteral(input)); }
public void ParseLiteral_NullValueNode() { // arrange var type = new IdType(); NullValueNode input = NullValueNode.Default; // act object output = type.ParseLiteral(input); // assert Assert.Null(output); }
public void ParseLiteral_IntValueNode() { // arrange var type = new IdType(); var input = new IntValueNode("123456"); // act object output = type.ParseLiteral(input); // assert Assert.IsType <string>(output); Assert.Equal("123456", output); }