AIMA.Test.Core.Unit.Logic.FOL.UnifierTest.testKnows5 C# (CSharp) Method

testKnows5() private method

private testKnows5 ( ) : void
return void
        public void testKnows5()
        {
            Sentence query = parser.parse("Knows(John,x)");
            Sentence johnKnowsJane = parser.parse("Knows(y,z)");
            Dictionary<Variable, Term> result = unifier.unify(query, johnKnowsJane, theta);

            Assert.AreEqual(2, result.Count);

            Assert.AreEqual(new Variable("z"), theta[new Variable("x")]); // x
            // =
            // z
            Assert.AreEqual(new Constant("John"), theta[new Variable("y")]); // y
            // =
            // John
        }