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

            // act
            type = type.WithValues(values);


            // assert
            Assert.Equal(values, type.Values);
        }
        public void WithValues()
        {
            // 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,
                new List <EnumValueDefinitionNode>());

            // act
            type = type.WithValues(values);


            // assert
            Assert.Equal(values, type.Values);
        }