AIMA.Test.Core.Unit.Logic.FOL.SubstVisitorTest.testSubstWithUniversalQuantifierAndSngleVariable C# (CSharp) Метод

testSubstWithUniversalQuantifierAndSngleVariable() приватный Метод

private testSubstWithUniversalQuantifierAndSngleVariable ( ) : void
Результат void
        public void testSubstWithUniversalQuantifierAndSngleVariable()
        {
            Sentence beforeSubst = parser.parse("FORALL x 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("FORALL x King(x))"), beforeSubst);
        }