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

testSubstWithNOTSentenceAndSngleVariable() private méthode

private testSubstWithNOTSentenceAndSngleVariable ( ) : void
Résultat void
        public void testSubstWithNOTSentenceAndSngleVariable()
        {
            Sentence beforeSubst = parser.parse("NOT King(x))");
            Sentence expectedAfterSubst = parser.parse("NOT 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("NOT King(x))"), beforeSubst);
        }