Beispiel #1
0
        public void CreateStageDocument()
        {
            var stage = new Stage(StageCategory.Decoder.Id, PolicyFile.BTSReceivePolicy.Value);

            var visitor       = new VisitorSpy();
            var stageDocument = visitor.CreateStageDocument(stage);

            stageDocument.CategoryId.Should().Be(StageCategory.Decoder.Id);
        }
Beispiel #2
0
        public void CreateReceivePartyResolverStageDocument()
        {
            var stage = new Stage(StageCategory.PartyResolver.Id, PolicyFile.BTSReceivePolicy.Value);

            var visitor       = new VisitorSpy();
            var stageDocument = visitor.CreateStageDocument(stage);

            stageDocument.CategoryId.Should().Be(StageCategory.PartyResolver.Id);
            stageDocument.PolicyFileStage.Should().BeEquivalentTo(PolicyFile.BTSReceivePolicy.Value.Stages[3]);
        }
Beispiel #3
0
        public void CreateSendPreAssemblerStageDocument()
        {
            var stage = new Stage(StageCategory.Any.Id, PolicyFile.BTSTransmitPolicy.Value);

            var visitor       = new VisitorSpy();
            var stageDocument = visitor.CreateStageDocument(stage);

            stageDocument.CategoryId.Should().Be(StageCategory.Any.Id);
            stageDocument.PolicyFileStage.Should().BeEquivalentTo(PolicyFile.BTSTransmitPolicy.Value.Stages[0]);
        }
Beispiel #4
0
        public void CreatePipelineDocument()
        {
            var pipeline = new ReceivePipelineImpl();

            var visitor          = new VisitorSpy();
            var pipelineDocument = visitor.CreatePipelineDocument(pipeline);

            pipelineDocument.PolicyFilePath.Should().Be(pipeline.GetPolicyFileName());
            pipelineDocument.Description.Should().Be("A receive pipeline.");
            pipelineDocument.MajorVersion.Should().Be(5);
            pipelineDocument.MinorVersion.Should().Be(6);
        }
Beispiel #5
0
        public void CreatePipelineDocument()
        {
            var pipeline = new ReceivePipelineImpl();

            var visitor          = new VisitorSpy();
            var pipelineDocument = visitor.CreatePipelineDocument(pipeline);

            pipelineDocument.PolicyFilePath.Should().Be(pipeline.GetPolicyFileName());
            pipelineDocument.Description.Should().Be("A receive pipeline.");
            pipelineDocument.MajorVersion.Should().Be(5);
            pipelineDocument.MinorVersion.Should().Be(6);
            pipelineDocument.FriendlyName.Should().Be(PolicyFile.BTSReceivePolicy.Value.FriendlyName);
            pipelineDocument.CategoryId.Should().Be(PolicyFile.BTSReceivePolicy.Value.CategoryId.ToString());
        }
Beispiel #6
0
        public void CreateComponentInfo()
        {
            var componentDescriptor = new PipelineComponentDescriptor <FailedMessageRoutingEnablerComponent>(new FailedMessageRoutingEnablerComponent());

            var visitor       = new VisitorSpy();
            var componentInfo = visitor.CreateComponentInfo(componentDescriptor);

            var expectedProperties = new[] {
                new PropertyContents("Enabled", true),
                new PropertyContents("EnableFailedMessageRouting", true),
                new PropertyContents("SuppressRoutingFailureReport", true)
            };

            componentInfo.QualifiedNameOrClassId.Should().Be(typeof(FailedMessageRoutingEnablerComponent).AssemblyQualifiedName);
            componentInfo.ComponentName.Should().Be(nameof(FailedMessageRoutingEnablerComponent));

            componentInfo.ComponentProperties
            .Cast <PropertyContents>()
            .Should().BeEquivalentTo(expectedProperties);
        }