Ejemplo n.º 1
0
        public async Task Async_Client_NotSerializableParameters_EnsureBoltSerializationException()
        {
            var client = CreateChannel();
            Mock<ITestContract> server = Server();
            var arg = new NotSerializableType(10);

            server.Setup(v => v.MethodWithNotSerializableType(It.IsAny<NotSerializableType>()));

            try
            {
                await client.MethodWithNotSerializableTypeAsync(arg);
            }
            catch (BoltClientException e) when (e.Error == ClientErrorCode.SerializeParameters)
            {
                // ok
            }
        }
Ejemplo n.º 2
0
 public virtual Task MethodWithNotSerializableTypeAsync(NotSerializableType arg)
 {
     return this.SendAsync(__MethodWithNotSerializableTypeAction, arg);
 }
Ejemplo n.º 3
0
        public async Task Async_Client_NotSerializableReturnValue_EnsureBoltServerException()
        {
            var client = CreateChannel();
            Mock<ITestContract> server = Server();
            var arg = new NotSerializableType(10);

            server.Setup(v => v.FunctionWithNotSerializableType()).Returns(arg);

            try
            {
                await client.FunctionWithNotSerializableTypeAsync();
            }
            catch (BoltServerException e)
            {
                if (e.Error != ServerErrorCode.SerializeResponse)
                {
                    throw;
                }
            }
        }
Ejemplo n.º 4
0
 public virtual void MethodWithNotSerializableType(NotSerializableType arg)
 {
     this.Send(__MethodWithNotSerializableTypeAction, arg);
 }