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

testKnows2() private method

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

            Assert.AreEqual(2, result.Count);

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