com.atlassian.pageobjects
Class TestedProductFactory

java.lang.Object
  extended by com.atlassian.pageobjects.TestedProductFactory

public class TestedProductFactory
extends Object

Constructs a TestedProduct. The TestedProduct instance is created by calling the constructor with the following method signature:

   TestedProduct(TesterFactory, ProductInstance)
 


Nested Class Summary
static class TestedProductFactory.SingletonTesterFactory<T extends Tester>
          A factory that always returns the same Tester
static interface TestedProductFactory.TesterFactory<T>
          A factory for Tester instances
 
Constructor Summary
TestedProductFactory()
           
 
Method Summary
static
<P extends TestedProduct<?>>
P
create(Class<P> testedProductClass)
          Creates a tested product, allowing the instance to choose its own default Tester and instance id
static
<P extends TestedProduct<?>>
P
create(Class<P> testedProductClass, ProductInstance productInstance, TestedProductFactory.TesterFactory<?> testerFactory)
          Creates a tested product using the passed tester factory and product instance.
static
<P extends TestedProduct<?>>
P
create(Class<P> testedProductClass, String instanceId, TestedProductFactory.TesterFactory<?> testerFactory)
          Creates a tested product using the passed tester factory and instance id.
static TestedProduct<?> create(String testedProductClass)
          Creates a tested product, allowing the instance to choose its own default Tester and instance id
static
<T extends TestedProduct<?>>
com.google.common.base.Supplier<T>
fromFactory(Class<T> productClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestedProductFactory

public TestedProductFactory()
Method Detail

fromFactory

public static <T extends TestedProduct<?>> com.google.common.base.Supplier<T> fromFactory(Class<T> productClass)

create

public static TestedProduct<?> create(String testedProductClass)
Creates a tested product, allowing the instance to choose its own default Tester and instance id

Parameters:
testedProductClass - The tested product class name
Returns:
The created tested product

create

public static <P extends TestedProduct<?>> P create(Class<P> testedProductClass)
Creates a tested product, allowing the instance to choose its own default Tester and instance id

Type Parameters:
P - The tested product type
Parameters:
testedProductClass - The tested product class
Returns:
The created tested product

create

public static <P extends TestedProduct<?>> P create(Class<P> testedProductClass,
                                                    String instanceId,
                                                    TestedProductFactory.TesterFactory<?> testerFactory)
Creates a tested product using the passed tester factory and instance id.

Type Parameters:
P - The tested product type
Parameters:
testedProductClass - The tested product class
instanceId - The instance id
testerFactory - The tester factory to use to pass to the tested product
Returns:
The created tested product

create

public static <P extends TestedProduct<?>> P create(Class<P> testedProductClass,
                                                    ProductInstance productInstance,
                                                    TestedProductFactory.TesterFactory<?> testerFactory)
Creates a tested product using the passed tester factory and product instance.

Type Parameters:
P - The tested product type
Parameters:
testedProductClass - The tested product class
productInstance - The product instance
testerFactory - The tester factory to use to pass to the tested product
Returns:
The created tested product


Copyright © 2014 Atlassian. All rights reserved.