本文整理汇总了C#中MessagePackObject.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# MessagePackObject.Equals方法的具体用法?C# MessagePackObject.Equals怎么用?C# MessagePackObject.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MessagePackObject
的用法示例。
在下文中一共展示了MessagePackObject.Equals方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestEquals_Map_Raw_False
public void TestEquals_Map_Raw_False()
{
var target = new MessagePackObject( new MessagePackObjectDictionary { { "A", "A" }, { "B", "B" }, { "C", "C" } } );
var other = new MessagePackObject( "ABC" );
Assert.IsFalse( target.Equals( other ) );
}
示例2: TestEqualsCore
private static void TestEqualsCore( MessagePackObject left, MessagePackObject right, bool expected )
{
Assert.AreEqual( expected, left.Equals( right ), "{0}=={1}", left.DebugDump(), right.DebugDump() );
}
示例3: TestEquals_EmptyMap_Empty_True
public void TestEquals_EmptyMap_Empty_True()
{
var target = new MessagePackObject( new MessagePackObjectDictionary( 0 ) );
Assert.IsTrue( target.Equals( new MessagePackObjectDictionary( 0 ) ) );
}
示例4: TestEquals_EmptyMap_Null_False
public void TestEquals_EmptyMap_Null_False()
{
var target = new MessagePackObject( new MessagePackObjectDictionary( 0 ) );
Assert.IsFalse( target.Equals( default( object ) ) );
}
示例5: TestEquals_Map_SubMap_False
public void TestEquals_Map_SubMap_False()
{
var target = new MessagePackObject( new MessagePackObjectDictionary() { { "A", 1 }, { "B", 2 }, { "C", 3 } } );
var other = new MessagePackObject( new MessagePackObjectDictionary() { { "A", 1 }, { "B", 2 } } );
Assert.IsFalse( target.Equals( other ) );
}
示例6: TestEquals_Map_Null_False
public void TestEquals_Map_Null_False()
{
var target = new MessagePackObject( new MessagePackObjectDictionary() { { "A", 1 }, { "B", 2 }, { "C", 3 } } );
Assert.IsFalse( target.Equals( default( object ) ) );
}
示例7: TestEquals_Array_Raw_False
public void TestEquals_Array_Raw_False()
{
var target = new MessagePackObject( new MessagePackObject[] { ( byte )'A', ( byte )'B', ( byte )'C' } );
var other = new MessagePackObject( "ABC" );
Assert.IsFalse( target.Equals( other ) );
}
示例8: TestEquals_EmptyArray_Null_False
public void TestEquals_EmptyArray_Null_False()
{
var target = new MessagePackObject( new MessagePackObject[ 0 ] );
Assert.IsFalse( target.Equals( default( object ) ) );
}
示例9: TestEquals_EmptyArray_Empty_True
public void TestEquals_EmptyArray_Empty_True()
{
var target = new MessagePackObject( new MessagePackObject[ 0 ] );
Assert.IsTrue( target.Equals( new MessagePackObject[ 0 ] ) );
}
示例10: TestEquals_Array_SubArray_False
public void TestEquals_Array_SubArray_False()
{
var target = new MessagePackObject( new MessagePackObject[] { 1, 2, 3 } );
var other = new MessagePackObject( new MessagePackObject[] { 1, 2 } );
Assert.IsFalse( target.Equals( other ) );
}
示例11: AssertArraySegment
private static void AssertArraySegment( MessagePackObject expected, ArraySegment<byte> actual )
{
var result = Unpacking.UnpackObject( actual.AsEnumerable().ToArray() );
Assert.That( result.ReadCount, Is.EqualTo( actual.Count ) );
Assert.That( expected.Equals( result.Value ) );
}