示例#1
0
        public void Invoking_a_method_on_a_proxy_should_send_message()
        {
            // arrange
            m_localContainer.Register(Component.For <IService>().LifeStyle.Transient.At(REMOTE_ADDR, SERVICE_KEY));

            var        proxy = m_localContainer.ResolveRemoteService <IService>(@".\private$\tmp");
            ITransport destinationTransport = new InProcTransport();

            destinationTransport.Init(@".\private$\tmp");

            // act
            proxy.Foo();

            // assert
            var msgReceived = destinationTransport
                              .Take(1)
                              .Timeout(TimeSpan.FromSeconds(1))
                              .First();

            msgReceived.Should().NotBeNull();
        }
示例#2
0
 public TestBase()
 {
     this.Timer     = new VirtualTimer(DateTime.UtcNow);
     this.Transport = new InProcTransport(this.Timer);
 }