Search in sources :

Example 6 with ComponentActionMap

use of com.axway.ats.agent.core.ComponentActionMap 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 ComponentActionMap

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

the class Test_DynamicComponentLoader method testLoadComponentsPositive.

@Test
public void testLoadComponentsPositive() throws AgentException {
    DynamicComponentLoader dynamicLoader = new DynamicComponentLoader(new File(RELATIVE_PATH_TO_TEST_RESOURCES), new Object());
    dynamicLoader.loadAvailableComponents(ComponentRepository.getInstance());
    ComponentActionMap actionMap = ComponentRepository.getInstance().getComponentActionMap(TEST_COMPONENT_NAME);
    assertNotNull(actionMap);
}
Also used : ComponentActionMap(com.axway.ats.agent.core.ComponentActionMap) File(java.io.File) Test(org.junit.Test) BaseTest(com.axway.ats.agent.core.BaseTest)

Example 8 with ComponentActionMap

use of com.axway.ats.agent.core.ComponentActionMap 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 ComponentActionMap

use of com.axway.ats.agent.core.ComponentActionMap 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

ComponentActionMap (com.axway.ats.agent.core.ComponentActionMap)9 Component (com.axway.ats.agent.core.Component)8 ComponentRepository (com.axway.ats.agent.core.ComponentRepository)7 BeforeClass (org.junit.BeforeClass)7 BaseTest (com.axway.ats.agent.core.BaseTest)1 ActionRequest (com.axway.ats.agent.core.action.ActionRequest)1 File (java.io.File)1 Test (org.junit.Test)1