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

testSubstSingleVariableFailsWithPredicate() private method

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

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

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