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());
        }
        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);
        }
        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);
        }
        public void Data()
        {
            ConstantTerm t = new ConstantTerm();

            Assert.IsNull(t.Data());
        }
        public void ConstantTerm()
        {
            ConstantTerm c = new ConstantTerm("Ali");

            Assert.AreEqual("Ali", c.Data());
        }