public void ParseValue_Nullable() { // arrange var type = new ShortType(); short?input = 123; // act IntValueNode output = (IntValueNode)type.ParseValue(input); // assert Assert.Equal(123, output.ToDouble()); }
public void ParseLiteral_IntLiteral() { // arrange var type = new FloatType(); var literal = new IntValueNode(123); // act var value = type.ParseLiteral(literal); // assert Assert.IsType <double>(value); Assert.Equal(literal.ToDouble(), value); }