Package fitnesse.testsystems

Examples of fitnesse.testsystems.TestSystemFactory


import fitnesse.testsystems.TestSystemFactory;

public class AddTestSystem {

  public AddTestSystem(String name, String className) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
    TestSystemFactory factory = (TestSystemFactory) Class.forName(className).newInstance();
    ((TestSystemFactoryRegistry)FitnesseFixtureContext.context.testSystemFactory).registerTestSystemFactory(name, factory);
  }
View Full Code Here


  public void registerInProcessTestSystemFactory(String name, TestSystemFactory testSystemFactory) {
    inProcessTestSystemFactories.put(name, testSystemFactory);
  }

  public TestSystem create(Descriptor descriptor) throws IOException {
    TestSystemFactory factory = null;
    if (descriptor.runInProcess()) {
      factory = inProcessTestSystemFactories.get(descriptor.getTestSystemType().toLowerCase());
    }
    if (factory == null) {
      factory = testSystemFactories.get(descriptor.getTestSystemType().toLowerCase());
    }
    if (factory == null) {
      throw new RuntimeException(String.format("Unknown test system: '%s'", descriptor.getTestSystemType()));
    }
    return factory.create(descriptor);
  }
View Full Code Here

TOP

Related Classes of fitnesse.testsystems.TestSystemFactory

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.