Ejemplo n.º 1
0
        public void VariableError_CreateWithoutLocation()
        {
            // arrange
            // act
            var error = new VariableError("foo", "bar");

            // assert
            Assert.Equal("foo", error.Message);
            Assert.Equal("bar", error.Extensions["variableName"]);
            Assert.Null(error.Locations);
            Assert.Null(error.Path);
        }
Ejemplo n.º 2
0
        public void VariableError_CreateWithoutLocation()
        {
            // arrange
            // act
#pragma warning disable CS0618 // Type or member is obsolete
            var error = new VariableError("foo", "bar");
#pragma warning restore CS0618 // Type or member is obsolete

            // assert
            Assert.Equal("foo", error.Message);
            Assert.Equal("bar", error.Extensions["variableName"]);
            Assert.Null(error.Locations);
            Assert.Null(error.Path);
        }