Пример #1
0
        public virtual void Expects(string pipelineName, PipelineArgs pipelineArgs)
        {
            Assert.ArgumentNotNullOrEmpty(pipelineName, "pipelineName");

            this.expectedCalls[pipelineName] = pipelineArgs;
            this.lastUsedPipelineName        = pipelineName;

            var path          = "/sitecore/pipelines/" + pipelineName + "/processor";
            var processorNode = XmlUtil.EnsurePath(path, this.config);

            processorNode.RemoveAll();

            var type  = typeof(PipelineWatcherProcessor);
            var value = type + ", " + type.Assembly.GetName().Name;

            XmlUtil.AddAttribute("type", value, processorNode);

            var expectedName = "<param desc=\"expectedName\">{0}</param>".FormatWith(pipelineName);

            XmlUtil.AddXml(expectedName, processorNode);
        }