Exemple #1
0
        public void ReceivePipelineDslGrammarVariant2()
        {
            // not fluent-DSL
            var pipeline = new ReceivePipeline <Pipelines.XmlReceive>();

            pipeline.Stages.Decode.Component <FailedMessageRoutingEnablerComponent>().Enabled = false;
            pipeline.Stages.Disassemble.Component <XmlDasmComp>().DocumentSpecNames           = new SchemaList {
                new SchemaWithNone(Schema <Any> .AssemblyQualifiedName),
                new SchemaWithNone(Schema <Claim.CheckIn> .AssemblyQualifiedName)
            };
            pipeline.Stages.Disassemble.Component <XmlDasmComp>().RecoverableInterchangeProcessing = true;
            pipeline.Stages.ResolveParty.Component <PolicyRunnerComponent>().Policy = Policy <ProcessResolver> .Name;
            var binding = ((IPipelineSerializerFactory)pipeline).GetPipelineBindingSerializer().Serialize();

            // fluent-DSL second variant
            var pipeline2 = ReceivePipeline <Pipelines.XmlReceive> .Configure(
                pl => pl
                .Decoder <FailedMessageRoutingEnablerComponent>(c => { c.Enabled = false; })
                .Disassembler <XmlDasmComp>(
                    c => {
                c.DocumentSpecNames = new SchemaList {
                    new SchemaWithNone(Schema <Any> .AssemblyQualifiedName),
                    new SchemaWithNone(Schema <Claim.CheckIn> .AssemblyQualifiedName)
                };
                c.RecoverableInterchangeProcessing = true;
            })
                .PartyResolver <PolicyRunnerComponent>(c => { c.Policy = Policy <ProcessResolver> .Name; }));

            var binding2 = ((IPipelineSerializerFactory)pipeline2).GetPipelineBindingSerializer().Serialize();

            Assert.That(binding2, Is.EqualTo(binding));
        }
Exemple #2
0
 public TestReferencedReceiveLocation()
 {
     Name              = "MyTestReferencedReceiveLocation";
     ReceivePipeline   = new ReceivePipeline <XmlReceive>();
     Transport.Adapter = new FileAdapter.Inbound(a => { a.ReceiveFolder = @"c:\files"; });
     Transport.Host    = "host";
 }
Exemple #3
0
        public void ReceivePipelineSerializeIsEmptyWhenDefaultPipelineConfigIsNotOverridden()
        {
            var pipeline = new ReceivePipeline <Microsoft.BizTalk.DefaultPipelines.XMLReceive>();
            var pipelineBindingSerializer = ((IPipelineSerializerFactory)pipeline).GetPipelineBindingSerializer();

            var binding = pipelineBindingSerializer.Serialize();

            Assert.That(binding, Is.Empty);
        }
Exemple #4
0
 public TwoWaySendPort()
 {
     Name            = "TwoWaySendPort";
     Description     = "Some Useless Two-Way Test Send Port";
     SendPipeline    = new SendPipeline <PassThruTransmit>();
     ReceivePipeline = new ReceivePipeline <PassThruReceive>(
         rp => rp.Decoder <PolicyRunnerComponent>(
             c => {
         c.Enabled       = true;
         c.ExecutionMode = PluginExecutionMode.Deferred;
         c.Policy        = Policy <Policies.Send.Claim.ProcessResolver> .Name;
     }));
     Transport.Adapter = new DummyAdapter();
     Transport.Host    = "Send Host Name";
 }
Exemple #5
0
 public TwoWayReceiveLocation()
 {
     Name            = "TwoWayReceiveLocation";
     Description     = "Some Useless Two-Way Test Receive Location";
     Enabled         = false;
     ReceivePipeline = new ReceivePipeline <PassThruReceive>();
     SendPipeline    = new SendPipeline <PassThruTransmit>(
         pl => pl.PreAssembler <PolicyRunnerComponent>(
             c => {
         c.Enabled       = true;
         c.ExecutionMode = PluginExecutionMode.Deferred;
         c.Policy        = Policy <Policies.Send.Claim.ProcessResolver> .Name;
     }));
     Transport.Adapter = new DummyAdapter();
     Transport.Host    = "Receive Host Name";
 }
Exemple #6
0
        public void ReceivePipelineSerializeKeepsOnlyStagesWhoseComponentsDefaultConfigHasBeenOverridden2()
        {
            var pipeline = ReceivePipeline <Pipelines.XmlReceive> .Configure(
                pl => pl
                .FirstDecoder <FailedMessageRoutingEnablerComponent>(c => { c.Enabled = false; })
                .FirstDecoder <ActivityTrackerComponent>(
                    c => {
                c.Enabled       = true;
                c.TrackingModes = ActivityTrackingModes.Claim;
            }));

            var binding = ((IPipelineSerializerFactory)pipeline).GetPipelineBindingSerializer().Serialize();

            Assert.That(
                binding,
                Is.EqualTo(
                    "<Root><Stages>" +
                    "<Stage CategoryId=\"9d0e4103-4cce-4536-83fa-4a5040674ad6\">" +
                    "<Components>" +
                    "<Component Name=\"Be.Stateless.BizTalk.Component.FailedMessageRoutingEnablerComponent\">" +
                    "<Properties><Enabled vt=\"11\">0</Enabled></Properties>" +
                    "</Component>" +
                    "<Component Name=\"Be.Stateless.BizTalk.Component.XmlTranslatorComponent\">" +
                    "<Properties />" +
                    "</Component>" +
                    "<Component Name=\"Be.Stateless.BizTalk.Component.ContextPropertyExtractorComponent\">" +
                    "<Properties />" +
                    "</Component><Component Name=\"Be.Stateless.BizTalk.Component.PolicyRunnerComponent\">" +
                    "<Properties />" +
                    "</Component>" +
                    "<Component Name=\"Be.Stateless.BizTalk.Component.ActivityTrackerComponent\">" +
                    "<Properties><Enabled vt=\"11\">-1</Enabled><TrackingModes vt=\"8\">Claim</TrackingModes></Properties>" +
                    "</Component>" +
                    "<Component Name=\"Be.Stateless.BizTalk.Component.XsltRunnerComponent\">" +
                    "<Properties />" +
                    "</Component>" +
                    "</Components>" +
                    "</Stage>" +
                    "</Stages></Root>"));
        }
Exemple #7
0
        public void ReceivePipelineSerializeKeepsOnlyStagesWhoseComponentsDefaultConfigHasBeenOverridden()
        {
            var pipeline = new ReceivePipeline <Microsoft.BizTalk.DefaultPipelines.XMLReceive>(
                pl => pl.Disassembler <XmlDasmComp>(
                    c => { c.RecoverableInterchangeProcessing = true; }));
            var pipelineBindingSerializer = ((IPipelineSerializerFactory)pipeline).GetPipelineBindingSerializer();

            var binding = pipelineBindingSerializer.Serialize();

            Assert.That(
                binding,
                Is.EqualTo(
                    "<Root><Stages>" +
                    "<Stage CategoryId=\"9d0e4105-4cce-4536-83fa-4a5040674ad6\">" +
                    "<Components>" +
                    "<Component Name=\"Microsoft.BizTalk.Component.XmlDasmComp\">" +
                    "<Properties><RecoverableInterchangeProcessing vt=\"11\">-1</RecoverableInterchangeProcessing></Properties>" +
                    "</Component>" +
                    "</Components>" +
                    "</Stage>" +
                    "</Stages></Root>"));
        }
Exemple #8
0
            public OneWayReceiveLocation()
            {
                Name            = "OneWayReceiveLocation";
                Description     = "Some Useless One-Way Test Receive Location";
                Enabled         = false;
                ReceivePipeline = new ReceivePipeline <PassThruReceive>(
                    pl => pl.Decoder <PolicyRunnerComponent>(
                        c => {
                    c.Enabled       = true;
                    c.ExecutionMode = PluginExecutionMode.Deferred;
                    c.Policy        = Policy <Policies.Send.Claim.ProcessResolver> .Name;
                }));
                Transport.Adapter = new DummyAdapter();

                Transport.Host     = "Receive Host Name";
                Transport.Schedule = new Schedule {
                    StartDate     = DateTime.Today,
                    StopDate      = DateTime.Today.AddDays(12),
                    ServiceWindow = new ServiceWindow {
                        StartTime = new Time(13, 15),
                        StopTime  = new Time(14, 15)
                    }
                };
            }