public void ArgumentError_CreateWithoutLocation() { // arrange var fieldSelection = new FieldNode( null, new NameNode("foo"), null, new List <DirectiveNode>(), new List <ArgumentNode>(), null); // act var error = new ArgumentError("a", "b", fieldSelection); // assert Assert.Equal("a", error.Message); Assert.Equal("b", error.Extensions["argumentName"]); Assert.Equal("foo", error.Extensions["fieldName"]); Assert.Null(error.Locations); }
public void ArgumentError_CreateWithoutLocation() { // arrange var fieldSelection = new FieldNode( null, new NameNode("foo"), null, new List <DirectiveNode>(), new List <ArgumentNode>(), null); // act #pragma warning disable CS0618 // Type or member is obsolete var error = new ArgumentError("a", "b", fieldSelection); #pragma warning restore CS0618 // Type or member is obsolete // assert Assert.Equal("a", error.Message); Assert.Equal("b", error.Extensions["argumentName"]); Assert.Equal("foo", error.Extensions["fieldName"]); Assert.Null(error.Locations); }