public void ReceivePipelineSerializationIsEmptyWhenDefaultPipelineConfigIsNotOverridden() { Skip.IfNot(BizTalkServerGroup.IsConfigured); var pipeline = new ReceivePipeline <Microsoft.BizTalk.DefaultPipelines.XMLReceive>(); var pipelineBindingSerializer = pipeline.GetPipelineBindingInfoSerializer(); var binding = pipelineBindingSerializer.Serialize(); binding.Should().BeEmpty(); }
public void ReceivePipelineDslGrammarVariant5() { Skip.IfNot(BizTalkServerGroup.IsConfigured); // not fluent-DSL var pipeline = new ReceivePipeline <XmlReceive>(); pipeline.Stages.Decode.Component <FailedMessageRoutingEnablerComponent>().Enabled = false; pipeline.Stages.Decode.Component <MicroPipelineComponent>().Components = new IMicroComponent[] { new XsltRunner { MapType = typeof(IdentityTransform) } }; pipeline.Stages.Disassemble.Component <XmlDasmComp>().DocumentSpecNames = new() { new SchemaWithNone(SchemaMetadata.For <Any>().DocumentSpec.DocSpecStrongName), new SchemaWithNone(SchemaMetadata.For <soap_envelope_1__2.Envelope>().DocumentSpec.DocSpecStrongName) }; pipeline.Stages.Disassemble.Component <XmlDasmComp>().RecoverableInterchangeProcessing = true; pipeline.Stages.Validate.Component <MicroPipelineComponent>().Components = new IMicroComponent[] { new XsltRunner { MapType = typeof(IdentityTransform) } }; var binding = pipeline.GetPipelineBindingInfoSerializer().Serialize(); // fluent-DSL fifth variant var pipeline5 = ReceivePipeline <XmlReceive> .Configure( pl => { pl.Stages.Decode .ComponentAt <FailedMessageRoutingEnablerComponent>(0).Configure(c => { c.Enabled = false; }) .ComponentAt <MicroPipelineComponent>(1) .Configure(mpc => { mpc.Components = new IMicroComponent[] { new XsltRunner { MapType = typeof(IdentityTransform) } }; }); pl.Stages.Disassemble.ComponentAt <XmlDasmComp>(0).Configure( c => { c.DocumentSpecNames = new() { new SchemaWithNone(SchemaMetadata.For <Any>().DocumentSpec.DocSpecStrongName), new SchemaWithNone(SchemaMetadata.For <soap_envelope_1__2.Envelope>().DocumentSpec.DocSpecStrongName) }; c.RecoverableInterchangeProcessing = true; }); pl.Stages.Validate.ComponentAt <MicroPipelineComponent>(0) .Configure(mpc => { mpc.Components = new IMicroComponent[] { new XsltRunner { MapType = typeof(IdentityTransform) } }; }); }); var binding5 = pipeline5.GetPipelineBindingInfoSerializer().Serialize(); binding5.Should().Be(binding); } [SkippableFact]
public void ReceivePipelineSerializationKeepsOnlyStagesWhoseComponentsDefaultConfigHasBeenOverridden() { Skip.IfNot(BizTalkServerGroup.IsConfigured); var pipeline = new ReceivePipeline <Microsoft.BizTalk.DefaultPipelines.XMLReceive>( pl => pl.Disassembler <XmlDasmComp>(c => { c.RecoverableInterchangeProcessing = true; })); var pipelineBindingSerializer = pipeline.GetPipelineBindingInfoSerializer(); var binding = pipelineBindingSerializer.Serialize(); binding.Should().Be( "<Root><Stages>" + "<Stage CategoryId=\"9d0e4105-4cce-4536-83fa-4a5040674ad6\">" + "<Components>" + $"<Component Name=\"{typeof(XmlDasmComp).FullName}\">" + "<Properties><RecoverableInterchangeProcessing vt=\"11\">-1</RecoverableInterchangeProcessing></Properties>" + "</Component>" + "</Components>" + "</Stage>" + "</Stages></Root>"); }