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

testMultipleVariableSubstitutionWithPredicate() private method

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

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

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