AIMA.Test.Core.Unit.Logic.FOL.SubstVisitorTest.testMultipleVariablePartiallySucceedsWithPredicate C# (CSharp) Méthode

testMultipleVariablePartiallySucceedsWithPredicate() private méthode

private testMultipleVariablePartiallySucceedsWithPredicate ( ) : void
Résultat void
        public void testMultipleVariablePartiallySucceedsWithPredicate()
        {
            Sentence beforeSubst = parser.parse("King(x,y)");
            Sentence expectedAfterSubst = parser.parse(" King(John ,y) ");

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

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