public void WithName() { // arrange var source = new Source("foo"); var start = new SyntaxToken( TokenKind.StartOfFile, 0, 0, 1, 1, null); var location = new Location(source, start, start); var name = new NameNode("foo"); var description = new StringValueNode("bar"); var directives = new List <DirectiveNode>(); var values = new List <EnumValueDefinitionNode>(); var type = new EnumTypeDefinitionNode( location, name, description, directives, values); // act type = type.WithName(new NameNode("baz")); // assert Assert.Equal("baz", type.Name.Value); }
public void WithName() { // arrange var location = new Location(0, 0, 0, 0); var name = new NameNode("foo"); var description = new StringValueNode("bar"); var directives = new List <DirectiveNode>(); var values = new List <EnumValueDefinitionNode>(); var type = new EnumTypeDefinitionNode( location, name, description, directives, values); // act type = type.WithName(new NameNode("baz")); // assert Assert.Equal("baz", type.Name.Value); }