public void Execution_of_pipeline_is_cancellable_by_member() { var t = new PublishPipelineTester<MessageA>(); t.Mock1.Setup(pm => pm.LookAt(It.IsAny<PublishToken>())).Callback((PublishToken token) => token.Cancel = true); t.TestWith(pp => pp.DefaultPublishPipeline(t.Mock1Object, t.Mock2Object)); t.VerifyCalled(t.Mock1); t.VerifyNotCalled(t.Mock2); }
public void publish_pipeline_is_extensible() { var t = new PublishPipelineTester<MessageB>(); t.TestWith(pp => pp.DefaultPublishPipeline(t.Mock1Object, t.Mock2Object)); t.Mock1.VerifyCalled(); t.Mock2.VerifyCalled(); }
public void Execution_of_pipeline_is_cancellable_by_member() { var t = new PublishPipelineTester<MessageA>(); t.Mock1.CancelTokenWhenSeen(); t.TestWith(pp => pp.DefaultPublishPipeline(t.Mock1Object, t.Mock2Object)); t.Mock1.VerifyCalled(); t.Mock2.VerifyNotCalled(); }
public void publish_pipeline_is_extensible() { var t = new PublishPipelineTester <MessageB>(); t.TestWith(pp => pp.DefaultPublishPipeline(t.Mock1Object, t.Mock2Object)); t.Mock1.VerifyCalled(); t.Mock2.VerifyCalled(); }
public void Execution_of_pipeline_is_cancellable_by_member() { var t = new PublishPipelineTester <MessageA>(); t.Mock1.CancelTokenWhenSeen(); t.TestWith(pp => pp.DefaultPublishPipeline(t.Mock1Object, t.Mock2Object)); t.Mock1.VerifyCalled(); t.Mock2.VerifyNotCalled(); }
public void default_pubish_pipeline_is_replaceable() { var t = new PublishPipelineTester <MessageB>(); var b = BusSetup.StartWith <Conservative>() .Apply(cb => cb.ConfigurePublishing(cp => cp.DefaultPublishPipeline(t.Mock1Object))) .Construct(); b.Publish(new MessageB()); t.Mock1.VerifyCalled(); }
public void default_pubish_pipeline_is_replaceable() { var t = new PublishPipelineTester<MessageB>(); var b = BusSetup.StartWith<Conservative>() .Apply(cb => cb.ConfigurePublishing(cp => cp.DefaultPublishPipeline(t.Mock1Object))) .Construct(); b.Publish(new MessageB()); t.Mock1.VerifyCalled(); }
public void non_default_publish_pipeline_takes_precedence() { var t = new PublishPipelineTester<MessageA>(); t.TestWith( pp => { pp.DefaultPublishPipeline(t.Mock1Object, t.Mock2Object); pp.MessageMatch(mi => mi.IsType<MessageA>()).PublishPipeline(t.Mock2Object); }); t.VerifyNotCalled(t.Mock1); t.VerifyCalled(t.Mock2); }
public void default_publish_pipeline_is_fallback() { var t = new PublishPipelineTester<MessageA>(); t.TestWith(pp => { pp.DefaultPublishPipeline(t.Mock1Object, t.Mock3Object); pp.MessageMatch(mi => mi.IsType<MessageB>()).PublishPipeline(t.Mock2Object); }); t.VerifyCalled(t.Mock1); t.VerifyNotCalled(t.Mock2); t.VerifyCalled(t.Mock3); }
public void non_default_publish_pipeline_takes_precedence() { var t = new PublishPipelineTester <MessageA>(); t.TestWith( pp => { pp.DefaultPublishPipeline(t.Mock1Object, t.Mock2Object); pp.MessageMatch(mi => mi.IsType <MessageA>()).PublishPipeline(t.Mock2Object); }); t.Mock1.VerifyNotCalled(); t.Mock2.VerifyCalled(); }
public void default_publish_pipeline_is_fallback() { var t = new PublishPipelineTester <MessageA>(); t.TestWith(pp => { pp.DefaultPublishPipeline(t.Mock1Object, t.Mock3Object); pp.MessageMatch(mi => mi.IsType <MessageB>()).PublishPipeline(t.Mock2Object); }); t.Mock1.VerifyCalled(); t.Mock2.VerifyNotCalled(); t.Mock3.VerifyCalled(); }