Пример #1
0
        public void create_bus_for_envelope()
        {
            var root     = new MockMessagingRoot();
            var original = ObjectMother.Envelope();

            var bus = root.ContextFor(original);

            bus.Envelope.ShouldBe(original);
            bus.EnlistedInTransaction.ShouldBeTrue();

            bus.As <MessageContext>().Transaction.ShouldBeOfType <InMemoryEnvelopeTransaction>();
        }
Пример #2
0
        public when_creating_a_service_bus_with_acknowledgement_required_envelope()
        {
            theEnvelope               = ObjectMother.Envelope();
            theEnvelope.Id            = Guid.NewGuid();
            theEnvelope.CorrelationId = Guid.NewGuid();
            theEnvelope.ReplyUri      = "tcp://server2:2000".ToUri();

            theEnvelope.AckRequested = true;

            var root = new MockMessagingRoot();
            var bus  = root.ContextFor(theEnvelope);

            theAcknowledgement = bus.As <MessageContext>().Outstanding.Single();
        }