All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.testng.internal.objects.Dispenser Maven / Gradle / Ivy

There is a newer version: 7.10.2
Show newest version
package org.testng.internal.objects;

import org.testng.ITestObjectFactory;

/** Supports Object instantiation taking into account Dependency Injection. */
public final class Dispenser {

  private Dispenser() {
    // Defeat instantiation
  }

  /** @return - An {@link IObjectDispenser} that backed by the chain of responsibilities. */
  public static IObjectDispenser newInstance(ITestObjectFactory objectFactory) {
    GuiceBasedObjectDispenser dispenser = new GuiceBasedObjectDispenser();
    dispenser.setNextDispenser(new SimpleObjectDispenser(objectFactory));
    return dispenser;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy