Search in sources :

Example 6 with Component

use of com.axway.ats.agent.core.Component in project ats-framework by Axway.

the class DisabledTest_RampUpQueueLoaderFixedDuration method setUpTest_ActionInvoker.

@BeforeClass
public static void setUpTest_ActionInvoker() throws AgentException {
    Component component = new Component(TEST_COMPONENT_NAME);
    ComponentActionMap actionMap = new ComponentActionMap(TEST_COMPONENT_NAME);
    actionMap.registerActionClass(LoadTestActionClass.class);
    component.setActionMap(actionMap);
    ComponentRepository componentRepository = ComponentRepository.getInstance();
    componentRepository.clear();
    componentRepository.putComponent(component);
    ActionRequest actionRequest = new ActionRequest(TEST_COMPONENT_NAME, "action 1", new Object[] { 3 });
    actionRequests = new ArrayList<ActionRequest>();
    actionRequests.add(actionRequest);
}
Also used : ComponentActionMap(com.axway.ats.agent.core.ComponentActionMap) ActionRequest(com.axway.ats.agent.core.action.ActionRequest) ComponentRepository(com.axway.ats.agent.core.ComponentRepository) Component(com.axway.ats.agent.core.Component) BeforeClass(org.junit.BeforeClass)

Example 7 with Component

use of com.axway.ats.agent.core.Component in project ats-framework by Axway.

the class MockDbEnvironmentUnit method getTestComponent.

private Component getTestComponent() {
    Component testComponent = new Component(COMPONENT_NAME);
    Map<String, Object> customProperties = new HashMap<String, Object>();
    customProperties.put(DbKeys.PORT_KEY, 3306);
    List<EnvironmentUnit> environmentUnits = new ArrayList<EnvironmentUnit>();
    environmentUnits.add(new MockDbEnvironmentUnit(new DbConnMySQL("host_1", "db_1", "user_1", "password_1", customProperties)));
    testComponent.setEnvironments(Arrays.asList(new ComponentEnvironment(COMPONENT_NAME, null, environmentUnits, "backupFolder")));
    return testComponent;
}
Also used : ComponentEnvironment(com.axway.ats.agent.core.ComponentEnvironment) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) DbConnMySQL(com.axway.ats.core.dbaccess.mysql.DbConnMySQL) EnvironmentUnit(com.axway.ats.environment.EnvironmentUnit) DatabaseEnvironmentUnit(com.axway.ats.environment.database.DatabaseEnvironmentUnit) Component(com.axway.ats.agent.core.Component)

Example 8 with Component

use of com.axway.ats.agent.core.Component in project ats-framework by Axway.

the class Test_ActionInvoker method setUpTest_ActionInvoker.

@BeforeClass
public static void setUpTest_ActionInvoker() throws AgentException {
    Component component = new Component(TEST_COMPONENT_NAME);
    ComponentActionMap actionMap = new ComponentActionMap(TEST_COMPONENT_NAME);
    actionMap.registerActionClass(ReallyComplexActionClass.class);
    component.setActionMap(actionMap);
    ComponentRepository componentRepository = ComponentRepository.getInstance();
    componentRepository.clear();
    componentRepository.putComponent(component);
}
Also used : ComponentActionMap(com.axway.ats.agent.core.ComponentActionMap) ComponentRepository(com.axway.ats.agent.core.ComponentRepository) Component(com.axway.ats.agent.core.Component) BeforeClass(org.junit.BeforeClass)

Example 9 with Component

use of com.axway.ats.agent.core.Component in project ats-framework by Axway.

the class Test_ActionMethod method setUpTest_ActionHandler.

@BeforeClass
public static void setUpTest_ActionHandler() throws AgentException {
    Component component = new Component(TEST_COMPONENT_NAME);
    ComponentActionMap actionMap = new ComponentActionMap(TEST_COMPONENT_NAME);
    actionMap.registerActionClass(ReallyComplexActionClass.class);
    component.setActionMap(actionMap);
    ComponentRepository componentRepository = ComponentRepository.getInstance();
    componentRepository.clear();
    componentRepository.putComponent(component);
}
Also used : ComponentActionMap(com.axway.ats.agent.core.ComponentActionMap) ComponentRepository(com.axway.ats.agent.core.ComponentRepository) Component(com.axway.ats.agent.core.Component) BeforeClass(org.junit.BeforeClass)

Aggregations

Component (com.axway.ats.agent.core.Component)9 ComponentActionMap (com.axway.ats.agent.core.ComponentActionMap)8 ComponentRepository (com.axway.ats.agent.core.ComponentRepository)7 BeforeClass (org.junit.BeforeClass)7 ComponentEnvironment (com.axway.ats.agent.core.ComponentEnvironment)1 ActionRequest (com.axway.ats.agent.core.action.ActionRequest)1 DbConnMySQL (com.axway.ats.core.dbaccess.mysql.DbConnMySQL)1 EnvironmentUnit (com.axway.ats.environment.EnvironmentUnit)1 DatabaseEnvironmentUnit (com.axway.ats.environment.database.DatabaseEnvironmentUnit)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1