Package fitnesse.components

Examples of fitnesse.components.ComponentFactory


  @Test
  public void canCreateVersionsControllerThroughComponentFactory() {
    Properties properties = new Properties();
    properties.put("VersionsController", "fitnesse.wiki.fs.SimpleFileVersionsController");
    ComponentFactory componentFactory = new ComponentFactory(properties);
    Object versionsController = componentFactory.createComponent("VersionsController", null);

    assertThat(versionsController, instanceOf(SimpleFileVersionsController.class));
  }
View Full Code Here


    this.testSystemListener = testSystemListener;
    return this;
  }

  public FitNesseContext makeFitNesseContext() throws IOException, PluginException {
    ComponentFactory componentFactory = new ComponentFactory(properties);

    if (port == null) {
      port = getPort();
    }

    FitNesseVersion version = new FitNesseVersion();

    updateFitNesseProperties(version);

    WikiPageFactory wikiPageFactory = (WikiPageFactory) componentFactory.createComponent(WIKI_PAGE_FACTORY_CLASS, FileSystemPageFactory.class);

    if (versionsController == null) {
      versionsController = (VersionsController) componentFactory.createComponent(VERSIONS_CONTROLLER_CLASS, ZipFileVersionsController.class);
      Integer versionDays = getVersionDays();
      if (versionDays != null) {
        versionsController.setHistoryDepth(versionDays);
      }
    }
    if (recentChanges == null) {
      recentChanges = (RecentChanges) componentFactory.createComponent(RECENT_CHANGES_CLASS, RecentChangesWikiPage.class);
    }

    if (root == null) {
      root = wikiPageFactory.makePage(new File(rootPath, rootDirectoryName), rootDirectoryName, null);
    }
View Full Code Here

    testProvider = new SymbolProvider(new SymbolType[] {});
    testWikiPageFactoryRegistry = new FileSystemPageFactory();
    testSlimTableFactory = new SlimTableFactory();
    testCustomComparatorsRegistry = new CustomComparatorRegistry();
    testTestSystemFactory = new MultipleTestSystemFactory(testSlimTableFactory, testCustomComparatorsRegistry);
    loader = new PluginsLoader(new ComponentFactory(testProperties));

    assertSymbolTypeMatch("!today", false);
  }
View Full Code Here

    initializeWikiPageFactories();
  }

  public FileSystemPageFactory(Properties properties) {
    fileSystem = new DiskFileSystem();
    versionsController = (VersionsController) new ComponentFactory(properties).createComponent(
            ConfigurationParameter.VERSIONS_CONTROLLER_CLASS, ZipFileVersionsController.class);
    versionsController.setHistoryDepth(Integer.parseInt(properties.getProperty(ConfigurationParameter.VERSIONS_CONTROLLER_DAYS.getKey(), "14")));
    variableSource = new SystemVariableSource(properties);
    initializeWikiPageFactories();
  }
View Full Code Here

TOP

Related Classes of fitnesse.components.ComponentFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.