CreatePagesFromDirectory() public method

public CreatePagesFromDirectory ( string templatePath, string destination, IList namespaces ) : void
templatePath string
destination string
namespaces IList
return void
        public void ReadsSubNamespaceDirectories()
        {
            var transformer = MockRepository.GenerateMock<IPageWriter>();
            var bulkTransformer = new BulkPageWriter(transformer);
            var namespaces = new Namespace[0];

            bulkTransformer.CreatePagesFromDirectory(directory, "output", namespaces);

            transformer.AssertWasCalled(x => x.CreatePages(directory_namespace_oneSpark, "output", namespaces));
        }
Ejemplo n.º 2
0
        public void Generate()
        {
            if (_assemblies.Count <= 0) return;

            var parser = new DocumentationModelBuilder(_commentParser, _eventAggregator);
            var namespaces = parser.CreateDocumentModel(_assemblies, _contentsOfXmlFiles);

            var writer = new BulkPageWriter(new PageWriter(new HtmlGenerator(), new FileSystemOutputWriter(), new PatternTemplateResolver()));
            writer.SetAssemblies(_assemblies);
            writer.CreatePagesFromDirectory(_templatePath, _outputPath, namespaces);

            var resourceManager = new UntransformableResourceManager();
            resourceManager.MoveResources(_templatePath, _outputPath);
        }
        public void shouldnt_parse_underscore_prefixed_spark_files()
        {
            var transformer = MockRepository.GenerateMock<IPageWriter>();
            var bulkTransformer = new BulkPageWriter(transformer);
            var namespaces = new Namespace[0];

            bulkTransformer.CreatePagesFromDirectory(directory, "output", namespaces);

            transformer.AssertWasNotCalled(x => x.CreatePages(directory_underscoreSpark, "output", namespaces));
        }
        public void should_pass_template_path_to_writer()
        {
            var transformer = MockRepository.GenerateMock<IPageWriter>();
            var bulkTransformer = new BulkPageWriter(transformer);
            var namespaces = new Namespace[0];

            bulkTransformer.CreatePagesFromDirectory(directory_sub, "output", namespaces);

            transformer.AssertWasCalled(x => x.SetTemplatePath(directory_sub));
        }