public void WithArguments() { // arrange var name = new NameNode("foo"); var description = new StringValueNode("bar"); var arguments = new List <InputValueDefinitionNode>(); var locations = new List <NameNode>(); var directiveDefinition = new DirectiveDefinitionNode( null, name, description, true, arguments, locations); // act directiveDefinition = directiveDefinition .WithArguments(new List <InputValueDefinitionNode> { new InputValueDefinitionNode ( null, new NameNode("arg"), null, new NamedTypeNode(new NameNode("type")), NullValueNode.Default, Array.Empty <DirectiveNode>() ) }); // assert directiveDefinition.MatchSnapshot(); }
public void WithDescription() { // arrange var name = new NameNode("foo"); var description = new StringValueNode("bar"); var arguments = new List <InputValueDefinitionNode>(); var locations = new List <NameNode>(); var directiveDefinition = new DirectiveDefinitionNode( null, name, description, true, arguments, locations); // act directiveDefinition = directiveDefinition .WithDescription(new StringValueNode("qux")); // assert directiveDefinition.MatchSnapshot(); }
public void AsRepeatable() { // arrange var name = new NameNode("foo"); var description = new StringValueNode("bar"); var arguments = new List <InputValueDefinitionNode>(); var locations = new List <NameNode>(); var directiveDefinition = new DirectiveDefinitionNode( null, name, description, false, arguments, locations); // act directiveDefinition = directiveDefinition .AsRepeatable(); // assert directiveDefinition.MatchSnapshot(); }