AskProperty() public method

public AskProperty ( Name property ) : Name
property Name
return Name
 public void Test_AskProperty_Self()
 {
     var kb = new KB((Name)"John");
     var value = Name.BuildName(kb.AskProperty(Name.SELF_SYMBOL).ToString());
     Assert.AreEqual(value, kb.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)"), Name.BuildName(true),Name.BuildName("John(Self)"));

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

            Assert.Null(kb.AskProperty(Name.BuildName("IsPerson(Mark)"), Name.BuildName("John(Self)")));

            var n = kb.AskProperty(Name.BuildName("IsPerson(Mary)"), Name.BuildName("John(Self)"));
            bool b;
            if(!n.TryConvertToValue(out b))
                Assert.Fail();
            Assert.True(b);
        }
        public void Test_Tell_Pass_Add_With_Perspective(string nativePerspective, string tellPerdicate, string tellPerspective, string queryPerdicate, string queryPerspective)
        {
            var kb = new KB(Name.BuildName(nativePerspective));
            kb.Tell(Name.BuildName(tellPerdicate), Name.BuildName(true), Name.BuildName(tellPerspective));

            using (var stream = new MemoryStream())
            {
                var formater = new JSONSerializer();
                formater.Serialize(stream, kb);
                stream.Seek(0, SeekOrigin.Begin);
                Console.WriteLine(new StreamReader(stream).ReadToEnd());
            }

            var r = kb.AskProperty(Name.BuildName(queryPerdicate), Name.BuildName(queryPerspective));
            bool b;
            if (!r.TryConvertToValue(out b))
                Assert.Fail();

            Assert.IsTrue(b);
        }
        public void Test_PrimitiveValuesAsk(string str, object expect)
        {
            Name v = (Name)str;
            KB kb = new KB((Name)"Me");
            var value = kb.AskProperty(v);
            Assert.NotNull(value);

            Assert.AreEqual(value, Name.BuildName(expect));
        }