Exemplo n.º 1
0
 public HtmlDocumentFormatter(Configuration configuration, HtmlHeaderFormatter htmlHeaderFormatter,
                              HtmlTableOfContentsFormatter htmlTableOfContentsFormatter,
                              HtmlContentFormatter htmlContentFormatter, HtmlFooterFormatter htmlFooterFormatter,
                              HtmlResourceSet htmlResources)
 {
     this.configuration = configuration;
     this.htmlHeaderFormatter = htmlHeaderFormatter;
     this.htmlTableOfContentsFormatter = htmlTableOfContentsFormatter;
     this.htmlContentFormatter = htmlContentFormatter;
     this.htmlFooterFormatter = htmlFooterFormatter;
     this.htmlResources = htmlResources;
 }
        public void Format_ContentIsFeatureNode_UsesHtmlFeatureFormatterWithCorrectArgument()
        {
            var fakeHtmlFeatureFormatter = new Mock<IHtmlFeatureFormatter>();
            var formatter = new HtmlContentFormatter(fakeHtmlFeatureFormatter.Object, new HtmlIndexFormatter());

            var featureNode = new FeatureNode(
                FileSystem.FileInfo.FromFileName(@"c:\temp\test.feature"),
                ".",
                new Feature());

            formatter.Format(featureNode, new INode[0]);

            fakeHtmlFeatureFormatter.Verify(f => f.Format(featureNode.Feature));
        }
        public void Format_ContentIsFeatureNode_UsesHtmlFeatureFormatterWithCorrectArgument()
        {
            var fakeHtmlFeatureFormatter = new Mock<IHtmlFeatureFormatter>();
            var formatter = new HtmlContentFormatter(fakeHtmlFeatureFormatter.Object, Container.Resolve<HtmlIndexFormatter>());

            var featureNode = new FeatureDirectoryTreeNode(
                new FileInfo(@"c:\temp\test.feature"),
                ".",
                new Feature());

            formatter.Format(featureNode, new IDirectoryTreeNode[0]);

            fakeHtmlFeatureFormatter.Verify(f => f.Format(featureNode.Feature));
        }
Exemplo n.º 4
0
 public HtmlDocumentFormatter(Configuration configuration, HtmlHeaderFormatter htmlHeaderFormatter,
                              HtmlTableOfContentsFormatter htmlTableOfContentsFormatter,
                              HtmlContentFormatter htmlContentFormatter, HtmlFooterFormatter htmlFooterFormatter,
                              HtmlResourceSet htmlResources,
                              IFileSystem fileSystem)
 {
     this.configuration                = configuration;
     this.htmlHeaderFormatter          = htmlHeaderFormatter;
     this.htmlTableOfContentsFormatter = htmlTableOfContentsFormatter;
     this.htmlContentFormatter         = htmlContentFormatter;
     this.htmlFooterFormatter          = htmlFooterFormatter;
     this.htmlResources                = htmlResources;
     this.fileSystem = fileSystem;
 }
        public void Format_ContentIsFeatureNode_UsesHtmlFeatureFormatterWithCorrectArgument()
        {
            var fakeHtmlFeatureFormatter = new Mock<IHtmlFeatureFormatter>();
            var fakeHtmlImageRelocator = new Mock<HtmlImageRelocator>(null, null);
            fakeHtmlImageRelocator.Setup(x => x.Relocate(It.IsAny<INode>(), It.IsAny<XElement>()));
            var formatter = new HtmlContentFormatter(fakeHtmlFeatureFormatter.Object, Container.Resolve<HtmlIndexFormatter>(), fakeHtmlImageRelocator.Object);

            var featureNode = new FeatureNode(
                FileSystem.FileInfo.FromFileName(@"c:\temp\test.feature"),
                ".",
                new Feature());

            formatter.Format(featureNode, new INode[0]);

            fakeHtmlFeatureFormatter.Verify(f => f.Format(featureNode.Feature));
        }
Exemplo n.º 6
0
 public HtmlDocumentFormatter(
     IConfiguration configuration,
     HtmlHeaderFormatter htmlHeaderFormatter,
     HtmlTableOfContentsFormatter htmlTableOfContentsFormatter,
     HtmlContentFormatter htmlContentFormatter,
     HtmlFooterFormatter htmlFooterFormatter,
     HtmlResourceSet htmlResources,
     IFileSystem fileSystem)
 {
     this.configuration = configuration;
     this.htmlHeaderFormatter = htmlHeaderFormatter;
     this.htmlTableOfContentsFormatter = htmlTableOfContentsFormatter;
     this.htmlContentFormatter = htmlContentFormatter;
     this.htmlFooterFormatter = htmlFooterFormatter;
     this.htmlResources = htmlResources;
     this.fileSystem = fileSystem;
 }