AIMA.Test.Core.Unit.Logic.FOL.SubstVisitorTest.testSubstSingleVariableSucceedsWithTermEquality2 C# (CSharp) 메소드

testSubstSingleVariableSucceedsWithTermEquality2() 개인적인 메소드

private testSubstSingleVariableSucceedsWithTermEquality2 ( ) : void
리턴 void
        public void testSubstSingleVariableSucceedsWithTermEquality2()
        {
            Sentence beforeSubst = parser.parse("BrotherOf(John) = x)");
            Sentence expectedAfterSubst = parser.parse("BrotherOf(John) = Richard");

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

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