com.atlassian.pageobjects.util
Class InjectingTestedProducts

java.lang.Object
  extended by com.atlassian.pageobjects.util.InjectingTestedProducts

public final class InjectingTestedProducts
extends Object

Manipulating and verifying TestedProducts abilities to inject dependencies.

Since:
2.1

Method Summary
static ConfigurableInjectionContext asConfigurableInjectionContext(TestedProduct<?> product)
          Returns configurable injection context associated with given product.
static InjectionContext asInjectionContext(TestedProduct<?> product)
          Returns injection context associated with given product.
static boolean supportsConfigurableInjection(TestedProduct<?> product)
          Checks whether given product supports injection.
static boolean supportsInjection(TestedProduct<?> product)
          Checks whether given product supports injection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

supportsInjection

public static boolean supportsInjection(TestedProduct<?> product)
Checks whether given product supports injection. That is whether the product itself, or the associated page binder is instance of InjectionContext.

Parameters:
product - product to verify
Returns:
true if product supports injection

supportsConfigurableInjection

public static boolean supportsConfigurableInjection(TestedProduct<?> product)
Checks whether given product supports injection. That is whether the product itself, or the associated page binder is instance of ConfigurableInjectionContext.

Parameters:
product - product to verify
Returns:
true if product supports configurable injection

asInjectionContext

public static InjectionContext asInjectionContext(TestedProduct<?> product)
Returns injection context associated with given product.

Parameters:
product - product to retrieve context from
Returns:
associated injection context, either from the product, or its page binder
Throws:
IllegalArgumentException - if the product is not providing injection (which can be verified by calling supportsInjection(com.atlassian.pageobjects.TestedProduct)

asConfigurableInjectionContext

public static ConfigurableInjectionContext asConfigurableInjectionContext(TestedProduct<?> product)
Returns configurable injection context associated with given product.

Parameters:
product - product to retrieve context from
Returns:
associated injection context, either from the product, or its page binder
Throws:
IllegalArgumentException - if the product is not providing configurable injection (which can be verified by calling supportsConfigurableInjection(com.atlassian.pageobjects.TestedProduct).


Copyright © 2014 Atlassian. All rights reserved.