public void Test_Fail_Change_Perspective_To_Invalid_Perspective(string perspective)
        {
            var kb = new KB(Name.BuildName("Mark"));

            kb.Tell(Name.BuildName("IsPerson(Self)"), true, Name.BuildName("John(Self)"));

            Assert.Throws <ArgumentException>(() => kb.UpdateKBAccordingToNewPerspective(Name.BuildName(perspective)));
        }
        public void Test_Tell_Pass_Add_Self_Belief_and_Change_Perspective_02()
        {
            var kb = new KB(Name.BuildName("Mark"));

            kb.Tell(Name.BuildName("IsPerson(Self)"), true, Name.BuildName("John(Self)"));

            kb.UpdateKBAccordingToNewPerspective(Name.BuildName("Mary"));

            Assert.Null(kb.AskProperty(Name.BuildName("IsPerson(Mark)"), Name.BuildName("John(Self)")));
            Assert.True((bool?)kb.AskProperty(Name.BuildName("IsPerson(Mary)"), Name.BuildName("John(Self)")));
        }
Beispiel #3
0
 public void UpdateKBAccordingToNewPerspective(Name newPerspective)
 {
     m_kb.UpdateKBAccordingToNewPerspective(newPerspective);
 }