本文整理匯總了C#中Actor.DeepEquals方法的典型用法代碼示例。如果您正苦於以下問題:C# Actor.DeepEquals方法的具體用法?C# Actor.DeepEquals怎麽用?C# Actor.DeepEquals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Actor
的用法示例。
在下文中一共展示了Actor.DeepEquals方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: TestActorConstructor_01
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: TestDeepEquals
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: TestActorDeserialize_01
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));
}