Example #1
0
        public void DetectsMessageContextRequirementAbsence()
        {
            var descriptor = new XslCompiledTransformDescriptor(new XslCompiledTransformDescriptorBuilder(typeof(IdentityTransform)));

            descriptor.ExtensionRequirements.Should().Be(ExtensionRequirements.None);
            descriptor.NamespaceResolver.Should().BeNull();
        }
Example #2
0
        public void DetectsMessageContextRequirement()
        {
            var descriptor = new XslCompiledTransformDescriptor(new XslCompiledTransformDescriptorBuilder(typeof(CompoundContextMapTransform)));

            descriptor.ExtensionRequirements.Should().Be(ExtensionRequirements.MessageContext);
            descriptor.NamespaceResolver.LookupNamespace("bf").Should().Be(BizTalkFactoryProperties.ContextBuilderTypeName.Namespace);
            descriptor.NamespaceResolver.LookupNamespace("bts").Should().Be(BtsProperties.ActualRetryCount.Namespace);
            descriptor.NamespaceResolver.LookupNamespace("tp").Should().BeNull();
        }
Example #3
0
        public void MessageContextRequirementDetection()
        {
            var td1 = new XslCompiledTransformDescriptor(new XslCompiledTransformDescriptorBuilder(typeof(AnyToAddPart)));

            Assert.That(td1.ExtensionRequirements, Is.EqualTo(ExtensionRequirements.MessageContext));
            Assert.That(td1.NamespaceResolver.LookupNamespace("bf"), Is.EqualTo(BizTalkFactoryProperties.EnvelopeSpecName.Namespace));
            Assert.That(td1.NamespaceResolver.LookupNamespace("tp"), Is.EqualTo(TrackingProperties.MessagingStepActivityId.Namespace));

            var td2 = new XslCompiledTransformDescriptor(new XslCompiledTransformDescriptorBuilder(typeof(BatchContentToAnyEnvelope)));

            Assert.That(td2.ExtensionRequirements, Is.EqualTo(ExtensionRequirements.None));
            Assert.That(td2.NamespaceResolver, Is.Null);
        }