Пример #1
0
        public void PipelineModel_should_no_longer_detect_named_nodes_removed_from_tail()
        {
            var namedChannel = new NamedChannelHandler("TEST");
            var node         = new PipelineModelNode {
                Handler = namedChannel, Name = namedChannel.Name
            };
            var pipelineModel = PipelineMutationModel.Fresh();

            pipelineModel = AddToTail(pipelineModel, node);
            Assert.True(pipelineModel.Contains(node.Name));
            pipelineModel = RemoveTail(pipelineModel);
            Assert.False(pipelineModel.Contains(namedChannel.Name));
        }
Пример #2
0
        public void PipelineModel_should_detect_named_nodes_added_to_tail()
        {
            var namedChannel  = new NamedChannelHandler("TEST");
            var namedChannel2 = new NamedChannelHandler("TEST2");
            var node          = new PipelineModelNode {
                Handler = namedChannel, Name = namedChannel.Name
            };
            var pipelineModel = PipelineMutationModel.Fresh();

            pipelineModel = AddToTail(pipelineModel, node);
            Assert.True(pipelineModel.Contains(node.Name));
            var node2 = new PipelineModelNode {
                Handler = namedChannel2, Name = namedChannel2.Name
            };

            pipelineModel = AddToTail(pipelineModel, node2);
            Assert.True(pipelineModel.Contains(node.Name));
            Assert.True(pipelineModel.Contains(node2.Name));
        }