AIMA.Test.Core.Unit.Logic.FOL.SubstVisitorTest.testParanthisedSingleVariable C# (CSharp) Method

testParanthisedSingleVariable() private method

private testParanthisedSingleVariable ( ) : void
return void
        public void testParanthisedSingleVariable()
        {
            Sentence beforeSubst = parser.parse("((( King(x))))");
            Sentence expectedAfterSubst = parser.parse("King(John) ");

            Dictionary<Variable, Term> p = new Dictionary<Variable, Term>();
            p.Add(new Variable("x"), new Constant("John"));

            Sentence afterSubst = sv.subst(p, beforeSubst);
            Assert.AreEqual(expectedAfterSubst, afterSubst);
            Assert.AreEqual(parser.parse("((( King(x))))"), beforeSubst);
        }
    }