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

testSubstWithUniversalQuantifierAndOneOfTwoVariablesMatched() private méthode

        public void testSubstWithUniversalQuantifierAndOneOfTwoVariablesMatched()
        {
            Sentence beforeSubst = parser.parse("FORALL x,y King(x,y))");
            Sentence expectedAfterSubst = parser.parse("FORALL x King(x,John)");

            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(parser.parse("FORALL x,y King(x,y))"), beforeSubst);
        }