예제 #1
0
 public void Connect()
 {
     _eventAwaiter        = new TNT.Tests.EventAwaiter <IConnection <TOriginContractInterface, TestChannel> >();
     Server.AfterConnect += _eventAwaiter.EventRaised;
     Server.StartListening();
     Server.TestListener.ImmitateAccept(ClientChannel);
     OriginConnection = _eventAwaiter.WaitOneOrDefault(500);
     Assert.IsNotNull(OriginConnection);
 }
예제 #2
0
 public void Connect()
 {
     _eventAwaiter        = new TNT.Tests.EventAwaiter <IConnection <TOriginContractInterface, TcpChannel> >();
     Server.AfterConnect += _eventAwaiter.EventRaised;
     Server.StartListening();
     ClientChannel.Connect(new IPEndPoint(IPAddress.Loopback, 12345));
     OriginConnection = _eventAwaiter.WaitOneOrDefault(500);
     Assert.IsNotNull(OriginConnection);
 }