org.easetech.easytest.runner
Class TestConfigUtil

java.lang.Object
  extended by org.easetech.easytest.runner.TestConfigUtil

public final class TestConfigUtil
extends Object

A utility class for Test Configuration based processes

Author:
Anuj Kumar

Field Summary
protected static org.slf4j.Logger LOG
          An instance of logger associated with the test framework.
 
Constructor Summary
TestConfigUtil()
           
 
Method Summary
static void loadConfigBeans(Class<?>... configClasses)
          Load the config beans from the given config classes
static void loadResourceProperties(Class<?> configClass, Object classInstance)
          Load the resource properties specified by TestProperties annotation
static void loadTestBeanConfig(Class<?> testClass)
          Load the test configurations using the provided TestConfigProvider annotation values
static void loadTestConfigurations(Class<?> testClass, Object testInstance)
          Load the test configurations for the test class and associated the bean instance with the fields annotated with Provided annotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.slf4j.Logger LOG
An instance of logger associated with the test framework.

Constructor Detail

TestConfigUtil

public TestConfigUtil()
Method Detail

loadTestBeanConfig

public static void loadTestBeanConfig(Class<?> testClass)
Load the test configurations using the provided TestConfigProvider annotation values

Parameters:
testClass -

loadConfigBeans

public static void loadConfigBeans(Class<?>... configClasses)
                            throws IllegalArgumentException,
                                   IllegalAccessException,
                                   InvocationTargetException,
                                   InstantiationException
Load the config beans from the given config classes

Parameters:
configClasses -
Throws:
IllegalArgumentException
IllegalAccessException
InvocationTargetException
InstantiationException

loadResourceProperties

public static void loadResourceProperties(Class<?> configClass,
                                          Object classInstance)
Load the resource properties specified by TestProperties annotation

Parameters:
configClass -
classInstance -

loadTestConfigurations

public static void loadTestConfigurations(Class<?> testClass,
                                          Object testInstance)
Load the test configurations for the test class and associated the bean instance with the fields annotated with Provided annotation

Parameters:
testClass - the test class on which the fields needs to be set
testInstance - a test instance of the test class


Copyright © 2013. All Rights Reserved.