Exemplo n.º 1
0
        public void WithDirectives()
        {
            // 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,
                new List <DirectiveNode>(),
                values);

            // act
            type = type.WithDirectives(directives);


            // assert
            Assert.Equal(directives, type.Directives);
        }
        public void WithDirectives()
        {
            // 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,
                new List <DirectiveNode>(),
                values);

            // act
            type = type.WithDirectives(directives);


            // assert
            Assert.Equal(directives, type.Directives);
        }