public void enqueue() { var messages = new FubuTransportation.Runtime.Invocation.InvocationContext(new Envelope{Message = new Message1()}, new HandlerChain()); var m1 = new Message1(); var m2 = new Message2(); messages.EnqueueCascading(m1); messages.EnqueueCascading(m2); messages.OutgoingMessages().ShouldHaveTheSameElementsAs(m1, m2); }
public void enqueue() { var messages = new FubuTransportation.Runtime.Invocation.InvocationContext(new Envelope { Message = new Message1() }, new HandlerChain()); var m1 = new Message1(); var m2 = new Message2(); messages.EnqueueCascading(m1); messages.EnqueueCascading(m2); messages.OutgoingMessages().ShouldHaveTheSameElementsAs(m1, m2); }
public void ignores_nulls_just_fine() { var messages = new FubuTransportation.Runtime.Invocation.InvocationContext(new Envelope { Message = new Message1() }, new HandlerChain()); messages.EnqueueCascading(null); messages.OutgoingMessages().Any().ShouldBeFalse(); }
public IActionBehavior BuildBehavior(ServiceArguments arguments, Guid behaviorId) { Arguments = arguments.ShouldBeOfType <FubuTransportation.Runtime.Invocation.InvocationContext>(); _cascadingMessages.Each(x => Arguments.EnqueueCascading(x)); _chain.UniqueId.ShouldEqual(behaviorId); return(_behavior); }
public void ignores_nulls_just_fine() { var messages = new FubuTransportation.Runtime.Invocation.InvocationContext(new Envelope { Message = new Message1() }, new HandlerChain()); messages.EnqueueCascading(null); messages.OutgoingMessages().Any().ShouldBeFalse(); }
public void SetUp() { theEnvelope = ObjectMother.Envelope(); theEnvelope.Message = new object(); theContinuationContext = new TestContinuationContext(); theContext = new FubuTransportation.Runtime.Invocation.InvocationContext(theEnvelope, new HandlerChain()); theContext.EnqueueCascading(new object()); theContext.EnqueueCascading(new object()); theContext.EnqueueCascading(new object()); theSender = new RecordingEnvelopeSender(); theContinuation = new ChainSuccessContinuation(theContext); theLogger = new RecordingLogger(); theContinuation.Execute(theEnvelope, theContinuationContext); }
public void SetUp() { theEnvelope = ObjectMother.Envelope(); theEnvelope.Message = new object(); theContinuationContext = new TestContinuationContext(); theContext = new FubuTransportation.Runtime.Invocation.InvocationContext(theEnvelope, new HandlerChain()); theContext.EnqueueCascading(new object()); theContext.EnqueueCascading(new object()); theContext.EnqueueCascading(new object()); theSender = new RecordingEnvelopeSender(); theContinuation = new ChainSuccessContinuation(theContext); theLogger = new RecordingLogger(); theContinuation.Execute(theEnvelope, theContinuationContext); }
public void SetUp() { theEnvelope = ObjectMother.Envelope(); theEnvelope.Message = new object(); theException = new Exception("Failure"); theEnvelope.Callback.Stub(x => x.MarkSuccessful()).Throw(theException); theContinuationContext = new TestContinuationContext(); theContext = new FubuTransportation.Runtime.Invocation.InvocationContext(theEnvelope, new HandlerChain()); theContext.EnqueueCascading(new object()); theContinuation = new ChainSuccessContinuation(theContext); theContinuation.Execute(theEnvelope, theContinuationContext); }
public void SetUp() { theEnvelope = ObjectMother.Envelope(); theEnvelope.Message = new object(); theException = new Exception("Failure"); theEnvelope.Callback.Stub(x => x.MarkSuccessful()).Throw(theException); theContinuationContext = new TestContinuationContext(); theContext = new FubuTransportation.Runtime.Invocation.InvocationContext(theEnvelope, new HandlerChain()); theContext.EnqueueCascading(new object()); theContinuation = new ChainSuccessContinuation(theContext); theContinuation.Execute(theEnvelope, theContinuationContext); }