Data() 공개 메소드

public Data ( ) : object
리턴 object
예제 #1
0
        public void Assign()
        {
            AbstractTerm term = new AbstractTerm();
            ConstantTerm con = new ConstantTerm("ali");

            term.Assign(con);

            Assert.AreSame(term.Dereference(), con);
            Assert.AreSame(term.Dereference(), con.Dereference());
            Assert.AreEqual(term.Data(), con.Data());
            Assert.AreSame(term.Reference(), con.Reference());
            Assert.IsFalse(term.IsList);
            Assert.IsFalse(term.IsObject);
            Assert.IsFalse(term.IsReference);
            Assert.IsFalse(term.IsStructure);
            Assert.IsTrue(term.IsConstant);
        }
예제 #2
0
        public void Unify_ref_con()
        {
            AbstractTerm term = new AbstractTerm();
            ConstantTerm con = new ConstantTerm();

            Assert.IsTrue(term.Unify(con));

            Assert.AreEqual(term.Data(), con.Data());
            Assert.AreSame(term.Reference(), con.Reference());
            Assert.IsTrue(term.IsConstant);
            Assert.IsFalse(term.IsReference);
        }
예제 #3
0
        public void ConstantTerm()
        {
            ConstantTerm c = new ConstantTerm("Ali");

            Assert.AreEqual("Ali", c.Data());
        }
예제 #4
0
 public void Data()
 {
     ConstantTerm t = new ConstantTerm();
     Assert.IsNull(t.Data());
 }
예제 #5
0
        public void Unify_con_ref()
        {
            AbstractTerm term = new AbstractTerm();

            ConstantTerm con = new ConstantTerm("ali");

            Assert.IsTrue(con.Unify(term));

            Assert.AreSame(term.Data(), con.Data());
        }