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)); }
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)); }
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)); }