Пример #1
0
 private static void printStartMessage(Arguments args, FitNesseContext context) {
   System.out.println("FitNesse (" + VERSION + ") Started...");
   System.out.print(context.toString());
   System.out.println(
       "\tpage version expiration set to " + args.getDaysTillVersionsExpire() + " days.");
   System.out.print(extraOutput);
 }
Пример #2
0
  private static FitNesseContext loadContext(Arguments arguments) throws Exception {
    FitNesseContext context = new FitNesseContext();
    ComponentFactory componentFactory = new ComponentFactory(context.rootPath);
    context.port = arguments.getPort();
    context.rootPath = arguments.getRootPath();
    context.rootPageName = arguments.getRootDirectory();
    context.rootPagePath = context.rootPath + "/" + context.rootPageName;
    context.root =
        componentFactory.getRootPage(
            FileSystemPage.makeRoot(context.rootPath, context.rootPageName));
    context.responderFactory = new ResponderFactory(context.rootPagePath);
    context.logger = makeLogger(arguments);
    context.authenticator = makeAuthenticator(arguments.getUserpass(), componentFactory);
    context.htmlPageFactory = componentFactory.getHtmlPageFactory(new HtmlPageFactory());

    extraOutput = componentFactory.loadResponderPlugins(context.responderFactory);
    extraOutput += componentFactory.loadWikiWidgetPlugins();
    extraOutput += componentFactory.loadWikiWidgetInterceptors();
    extraOutput += componentFactory.loadContentFilter();

    WikiImportTestEventListener.register();

    return context;
  }
Пример #3
0
 // TODO MdM. This boolean agument is annoying... please fix.
 public FitNesse(FitNesseContext context, boolean makeDirs) {
   this.context = context;
   context.fitnesse = this;
   if (makeDirs) establishRequiredDirectories();
 }