Ejemplo n.º 1
0
        public void Setup()
        {
            Address.InitializeLocalAddress("MyEndpoint");

            Configure.GetEndpointNameAction = () => "MyEndpoint";

            messageSender = new FakeMessageSender();
            manager = new DefaultTimeoutManager
                {
                    MessageSender = messageSender,
                };
        }
Ejemplo n.º 2
0
        public void Setup()
        {
            Address.InitializeLocalAddress("MyEndpoint");

            Configure.GetEndpointNameAction = () => "MyEndpoint";

            messageSender = new FakeMessageSender();
            manager       = new DefaultTimeoutManager
            {
                MessageSender = messageSender,
            };
        }
Ejemplo n.º 3
0
        public void Setup()
        {
            persister = CreateTimeoutPersister();
            messageSender = new FakeMessageSender();

            manager = new DefaultTimeoutManager
                {
                    TimeoutsPersister = persister,
                    MessageSender = messageSender,
                };

            receiver = new TimeoutPersisterReceiver
                {
                    TimeoutManager = manager,
                    TimeoutsPersister = persister,
                    MessageSender = messageSender,
                    SecondsToSleepBetweenPolls = 1,
                };
        }
Ejemplo n.º 4
0
        public void Setup()
        {
            persister     = CreateTimeoutPersister();
            messageSender = new FakeMessageSender();

            manager = new DefaultTimeoutManager
            {
                TimeoutsPersister = persister,
                MessageSender     = messageSender,
            };

            receiver = new TimeoutPersisterReceiver
            {
                TimeoutManager             = manager,
                TimeoutsPersister          = persister,
                MessageSender              = messageSender,
                SecondsToSleepBetweenPolls = 1,
            };
        }
Ejemplo n.º 5
0
        public void Should_dispatch_timeout_if_is_due_now()
        {
            var messageSender = new FakeMessageSender();

            var configure = new BusConfiguration().BuildConfiguration();

            configure.localAddress = new Address("sdad", "asda");
            var manager = new DefaultTimeoutManager
            {
                MessageSender = messageSender,
                Configure     = configure
            };

            manager.PushTimeout(new TimeoutData
            {
                Time = DateTime.UtcNow,
            });

            Assert.AreEqual(1, messageSender.MessagesSent);
        }
Ejemplo n.º 6
0
        public void Should_dispatch_timeout_if_is_due_now()
        {
           var  messageSender = new FakeMessageSender();

            var configure = new BusConfiguration().BuildConfiguration();

            configure.localAddress = new Address("sdad", "asda");
            var manager = new DefaultTimeoutManager
            {
                MessageSender = messageSender,
                Configure = configure
            };

            manager.PushTimeout(new TimeoutData
                {
                    Time = DateTime.UtcNow,
                });

            Assert.AreEqual(1, messageSender.MessagesSent);
        }
Ejemplo n.º 7
0
        public void Setup()
        {
            Address.InitializeLocalAddress("MyEndpoint");

            Configure.GetEndpointNameAction = () => "MyEndpoint";

            persister     = CreateTimeoutPersister();
            messageSender = new FakeMessageSender();

            manager = new DefaultTimeoutManager
            {
                TimeoutsPersister = persister,
                MessageSender     = messageSender,
            };

            receiver = new TimeoutPersisterReceiver
            {
                TimeoutManager             = manager,
                TimeoutsPersister          = persister,
                MessageSender              = messageSender,
                SecondsToSleepBetweenPolls = 1,
            };
        }
Ejemplo n.º 8
0
        public void Setup()
        {
            Address.InitializeLocalAddress("MyEndpoint");

            Configure.GetEndpointNameAction = () => "MyEndpoint";

            persister = CreateTimeoutPersister();
            messageSender = new FakeMessageSender();

            manager = new DefaultTimeoutManager
                {
                    TimeoutsPersister = persister,
                    MessageSender = messageSender,
                };

            receiver = new TimeoutPersisterReceiver
                {
                    TimeoutManager = manager,
                    TimeoutsPersister = persister,
                    MessageSender = messageSender,
                    SecondsToSleepBetweenPolls = 1,
                };
        }