예제 #1
0
        internal SemanticPart Substitute(NodeReference originalReference, NodeReference substitutedNode)
        {
            //TODO for now it is sufficient to have only StartNode substitution
            //but this is only because of using only path edges !!!!
            var startNode = StartNode;

            if (StartNode.Equals(originalReference))
            {
                startNode = substitutedNode;
            }

            return(new SemanticPart(Utterance, startNode, Paths));
        }
예제 #2
0
        public void EqualsShouldReturnFalseWhenComparingWithDifferentType()
        {
            var lhs = new NodeReference(3);

            Assert.IsFalse(lhs.Equals(new object()));
        }
예제 #3
0
        public void EqualsShouldReturnFalseWhenComparingWithNull()
        {
            var lhs = new NodeReference(3);

            Assert.IsFalse(lhs.Equals(null));
        }
예제 #4
0
 public void EqualsShouldReturnFalseWhenComparingWithNull()
 {
     var lhs = new NodeReference(3);
     Assert.IsFalse(lhs.Equals(null));
 }
예제 #5
0
 public void EqualsShouldReturnFalseWhenComparingWithDifferentType()
 {
     var lhs = new NodeReference(3);
     Assert.IsFalse(lhs.Equals(new object()));
 }