public void ParseValue_Null() { // arrange var type = new FieldSetType(); // act IValueNode valueSyntax = type.ParseValue(null); // assert Assert.IsType <NullValueNode>(valueSyntax); }
public void ParseValue_InvalidValue() { // arrange var type = new FieldSetType(); // act void Action() => type.ParseValue(1); // assert Assert.Throws <SerializationException>(Action); }
public void ParseValue() { // arrange var type = new FieldSetType(); SelectionSetNode selectionSet = Utf8GraphQLParser.Syntax.ParseSelectionSet("{ a b c d e(d: $b) }"); // act IValueNode valueSyntax = type.ParseValue(selectionSet); // assert Assert.Equal( "a b c d e(d: $b)", Assert.IsType <StringValueNode>(valueSyntax).Value); }