Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.devbliss.doctest.renderer.html;
 
 import java.util.List;
 
Simply gets all files from the doctests directory and lists them in a index.html. This approach is really stupid, but the cool thing is that it works without using a TestRunner or Testsuite. Zero conf and hazzle free. Means each test driven by DocTestMachineImpl generates a new index.html. But this should be cheap in terms of time consumed.

Author(s):
rbauer, bmary
    private final FileHelper fileHelper;
    @Inject
    public HtmlIndexFileRenderer(HtmlItems htmlItemsFileHelper fileHelper) {
        super(htmlItems);
        this. = fileHelper;
    }
    public void render(List<DocItemlistItemsString nameString introductionthrows Exception {
        String nameWithExtension = .getCompleteFileName();
        List<LinkDocItemfiles = .getListOfFile(nameWithExtension);
        MenuDocItem menu = new MenuDocItem("List of doctest files"files);
        String body = .getListFilesTemplate(menu);
        IndexFileDocItem index = new IndexFileDocItem(namebody);
        .writeFile(nameWithExtension.getIndexTemplate(index));
    }
New to GrepCode? Check out our FAQ X