コード例 #1
0
        public void Document_With_Location_Null()
        {
            // arrange
            var location = new Location(0, 0, 0, 0);

            var fragment = new FragmentDefinitionNode(
                null, new NameNode("foo"),
                Array.Empty <VariableDefinitionNode>(),
                new NamedTypeNode("foo"),
                Array.Empty <DirectiveNode>(),
                new SelectionSetNode(Array.Empty <ISelectionNode>()));

            var document = new DocumentNode(location, new IDefinitionNode[] { fragment });

            // act
            document = document.WithLocation(null);

            // assert
            Assert.Null(document.Location);
        }