Beispiel #1
0
        public void StringValueNode_Equals_To_Null()
        {
            // arrange
            var location    = new Location(1, 1, 1, 1);
            var stringValue = Encoding.UTF8.GetBytes("abc");
            var value       = new StringValueNode(location, stringValue, true);

            // act
            var equals = value.Equals(null);

            // assert
            Assert.False(equals);
        }
Beispiel #2
0
        public void ValueNode_Equals_To_Other(string value, bool expected)
        {
            // arrange
            var location = new Location(1, 1, 1, 1);
            var value1   = new StringValueNode(location, "abc", true);
            var value2   = new StringValueNode(location, value, true);

            // act
            var equals = value1.Equals((IValueNode)value2);

            // assert
            Assert.Equal(expected, equals);
        }