public void Proxy_AskWithException_Throws()
        {
            var channelPair     = TntTestHelper.CreateChannelPair();
            var proxyConnection = TntBuilder
                                  .UseContract <IExceptionalContract>()
                                  .UseReceiveDispatcher <NotThreadDispatcher>()
                                  .UseChannel(channelPair.CahnnelA)
                                  .Build();

            var originConnection = TntBuilder
                                   .UseContract <IExceptionalContract, ExceptionalContract>()
                                   .UseReceiveDispatcher <NotThreadDispatcher>()
                                   .UseChannel(channelPair.ChannelB)
                                   .Build();

            channelPair.ConnectAndStartReceiving();
            TestTools.AssertThrows_AndNotBlocks_AndContainsInfo <RemoteUnhandledException>(() => proxyConnection.Contract.Ask());
        }
        public void Origin_AskExceptioanlCallback_Throws()
        {
            var channelPair = TntTestHelper.CreateChannelPair();

            var proxyConnection = TntBuilder
                                  .UseContract <ITestContract>()
                                  .UseReceiveDispatcher <NotThreadDispatcher>()
                                  .UseContractInitalization((c, _) =>
            {
                c.OnAsk += () => { throw new InvalidOperationException(); };
            })
                                  .UseChannel(channelPair.CahnnelA)
                                  .Build();

            var originConnection = TntBuilder
                                   .UseContract <ITestContract, TestContractMock>()
                                   .UseReceiveDispatcher <NotThreadDispatcher>()
                                   .UseChannel(channelPair.ChannelB)
                                   .Build();

            channelPair.ConnectAndStartReceiving();
            TestTools.AssertThrows_AndNotBlocks_AndContainsInfo <RemoteUnhandledException>(() => originConnection.Contract.OnAsk());
        }