[InlineData("hello", "hello")] // parsing "hello" should return "hello" public void ParseValue(string externalValue, string internalValue) { var c = new CustomScalar(); // try parsing value c.ParseValue(externalValue).ShouldBe(internalValue); }
[InlineData("hello", "hello")] // serializing "hello" should return "hello" public void Serialize(string internalValue, string externalValue) { var c = new CustomScalar(); // try serializing c.Serialize(internalValue).ShouldBe(externalValue); }
[InlineData("hello", "hello")] // parsing "hello" should return "hello" public void ParseLiteral(string externalValue, string internalValue) { var c = new CustomScalar(); // try parsing literal AST c.ParseLiteral(externalValue == null ? (IValue) new NullValue() : new StringValue(externalValue)).ShouldBe(internalValue); }
[InlineData("hello", "hello")] // serializing "hello" should return "hello" public void ToAST(string internalValue, string externalValue) { var c = new CustomScalar(); // try converting internal value to AST var ast = c.ToAST(internalValue); ast.ShouldNotBeNull(); ast.Value.ShouldBe(externalValue); }