コード例 #1
0
        public void TestEquals_SameError_NilDetail_False()
        {
            var left  = new RpcErrorMessage(RpcError.MessageRefusedError, CreateDetail("Message", "Debug"));
            var right = new RpcErrorMessage(RpcError.MessageRefusedError, MessagePackObject.Nil);

            Assert.That(left.Equals(right), Is.False);
            Assert.That(right.Equals(left), Is.False);
            Assert.That(left == right, Is.False);
            Assert.That(right == left, Is.False);
            Assert.That(left != right, Is.True);
            Assert.That(right != left, Is.True);
        }
コード例 #2
0
        public void TestEquals_DifferenceError_SameDetail_False()
        {
            var left  = new RpcErrorMessage(RpcError.MessageTooLargeError, CreateDetail("Message", "Debug"));
            var right = new RpcErrorMessage(RpcError.MessageRefusedError, CreateDetail("Message", "Debug"));

            Assert.That(left.Equals(right), Is.False);
            Assert.That(right.Equals(left), Is.False);
            Assert.That(left == right, Is.False);
            Assert.That(right == left, Is.False);
            Assert.That(left != right, Is.True);
            Assert.That(right != left, Is.True);
        }
コード例 #3
0
ファイル: RpcErrorMessageTest.cs プロジェクト: Indifer/Test
		public void TestEquals_OtherType_False()
		{
			var left = new RpcErrorMessage( RpcError.MessageRefusedError, CreateDetail( "Message", "Debug" ) );
			Assert.That( left.Equals( "ABC" ), Is.False );
		}
コード例 #4
0
ファイル: RpcErrorMessageTest.cs プロジェクト: Indifer/Test
		public void TestEquals_SameError_NilDetail_False()
		{
			var left = new RpcErrorMessage( RpcError.MessageRefusedError, CreateDetail( "Message", "Debug" ) );
			var right = new RpcErrorMessage( RpcError.MessageRefusedError, MessagePackObject.Nil );
			Assert.That( left.Equals( right ), Is.False );
			Assert.That( right.Equals( left ), Is.False );
			Assert.That( left == right, Is.False );
			Assert.That( right == left, Is.False );
			Assert.That( left != right, Is.True );
			Assert.That( right != left, Is.True );
		}
コード例 #5
0
ファイル: RpcErrorMessageTest.cs プロジェクト: Indifer/Test
		public void TestEquals_DifferenceError_SameDetail_False()
		{
			var left = new RpcErrorMessage( RpcError.MessageTooLargeError, CreateDetail( "Message", "Debug" ) );
			var right = new RpcErrorMessage( RpcError.MessageRefusedError, CreateDetail( "Message", "Debug" ) );
			Assert.That( left.Equals( right ), Is.False );
			Assert.That( right.Equals( left ), Is.False );
			Assert.That( left == right, Is.False );
			Assert.That( right == left, Is.False );
			Assert.That( left != right, Is.True );
			Assert.That( right != left, Is.True );
		}
コード例 #6
0
        public void TestEquals_OtherType_False()
        {
            var left = new RpcErrorMessage(RpcError.MessageRefusedError, CreateDetail("Message", "Debug"));

            Assert.That(left.Equals("ABC"), Is.False);
        }