本文整理汇总了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));
}