public void TrySerialize_Invalid_Format() { // arrange var type = new FieldSetType(); // act var success = type.TrySerialize(1, out object?serialized); // assert Assert.False(success); Assert.Null(serialized); }
public void TrySerialize() { // arrange var type = new FieldSetType(); SelectionSetNode selectionSet = Utf8GraphQLParser.Syntax.ParseSelectionSet("{ a b c d e(d: $b) }"); // act var success = type.TrySerialize(selectionSet, out object?serialized); // assert Assert.True(success); Assert.Equal("a b c d e(d: $b)", serialized); }