public void ProxySayCall_NoThreadDispatcher_OriginSayCalled(string sentMessage) { var channelPair = TntTestHelper.CreateThreadlessChannelPair(); var proxyConnection = TntBuilder .UseContract <ITestContract>() .UseReceiveDispatcher <NotThreadDispatcher>() .UseChannel(channelPair.CahnnelA) .Build(); var originConnection = TntBuilder .UseContract <ITestContract, TestContractMock>() .UseReceiveDispatcher <NotThreadDispatcher>() .UseChannel(channelPair.ChannelB) .Build(); channelPair.ConnectAndStartReceiving(); proxyConnection.Contract.Say(sentMessage); var received = ((TestContractMock)originConnection.Contract).SaySCalled.Single(); Assert.AreEqual(sentMessage, received); }
private static void TestDirectTestConnection() { _output.WriteLine("-------------Direct test mock test--------------"); var pair = TntTestHelper.CreateThreadlessChannelPair(); var proxy = TntBuilder .UseContract <ISpeedTestContract>() .UseReceiveDispatcher <ConveyorDispatcher>() .UseChannel(pair.CahnnelA) .Build(); var origin = TntBuilder .UseContract <ISpeedTestContract, SpeedTestContract>() .UseReceiveDispatcher <ConveyorDispatcher>() .UseChannel(pair.ChannelB) .Build(); pair.ConnectAndStartReceiving(); Test(proxy); pair.Disconnect(); }