예제 #1
0
        public void TestActorConstructor_01()
        {
            DateTime now = DateTime.Now;

            Actor actor = new Actor();
            actor.MetaUrl = "metaUrl 1";
            actor.Uid = "uid 1";
            actor.Value = "value 1";

            Actor actor2 = new Actor(
                "value 1",
                "uid 1",
                "metaUrl 1");

            Assert.IsTrue(actor.DeepEquals(actor2));
        }
예제 #2
0
 private void TestDeepEquals(Actor objectA, Actor objectB, bool expect, bool expectDeep)
 {
     Assert.AreEqual(expectDeep, objectA.DeepEquals(objectB));
     Assert.AreEqual(expectDeep, objectB.DeepEquals(objectA));
     Assert.AreEqual(expect, objectA.Equals(objectB));
     Assert.AreEqual(expect, objectB.Equals(objectA));
 }
예제 #3
0
        public void TestActorDeserialize_01()
        {
            Actor actor = new Actor(
                "value 1",
                "uid 1",
                "metaUrl 1");

            string str = XmlHelper.Instance.ToXmlString<Actor>(actor);

            Actor des = XmlHelper.Instance.FromXmlString<Actor>(str);
            Assert.IsTrue(actor.DeepEquals(des));
        }