Class TestConfiguration
- java.lang.Object
-
- com.jacob.com.JacobObject
-
- com.jacob.com.Dispatch
-
- de.tracetronic.jenkins.plugins.ecutest.wrapper.com.ETComDispatch
-
- de.tracetronic.jenkins.plugins.ecutest.wrapper.com.TestConfiguration
-
- All Implemented Interfaces:
ComTestConfiguration
,AutoCloseable
public class TestConfiguration extends ETComDispatch implements ComTestConfiguration
COM object representing the currently loaded test configuration file and provides methods for accessing the contained settings.
-
-
Constructor Summary
Constructors Constructor Description TestConfiguration(com.jacob.com.Dispatch dispatch, boolean useTimeout)
Instantiates a newTestConfiguration
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFileName()
Returns the full path of this test configuration.ComConstants
getGlobalConstants()
Queries all global constants of the currently loaded test configuration.void
setGlobalConstant(String name, String value)
Assigns a value to a global constant.-
Methods inherited from class de.tracetronic.jenkins.plugins.ecutest.wrapper.com.ETComDispatch
close, finalize, isAttached, performDirectRequest, performDirectRequest, performRequest, performRequest, performRequest, performRequest, useTimeout
-
Methods inherited from class com.jacob.com.Dispatch
call, call, call, call, callN, callN, callN_CaseSensitive, callSub, callSub, callSub, callSub, callSubN, callSubN, coCreateInstance, get, get, get_CaseSensitive, getActiveInstance, getIDOfName, getIDsOfNames, getIDsOfNames, getProgramId, hasExited, hasExited, invoke, invoke, invoke, invokeSub, invokeSub, invokeSub, invokeSubv, invokeSubv, invokeSubv, invokev, invokev, invokev, invokev, put, put, put_Casesensitive, putRef, putRef, QueryInterface, safeRelease
-
-
-
-
Constructor Detail
-
TestConfiguration
public TestConfiguration(com.jacob.com.Dispatch dispatch, boolean useTimeout)
Instantiates a newTestConfiguration
.This constructor is used instead of a case operation to turn a Dispatch object into a wider object - it must exist in every wrapper class whose instances may be returned from method calls wrapped in VT_DISPATCH Variants.
- Parameters:
dispatch
- the dispatchuseTimeout
- specifies whether to apply timeout
-
-
Method Detail
-
setGlobalConstant
public void setGlobalConstant(String name, String value) throws ETComException
Description copied from interface:ComTestConfiguration
Assigns a value to a global constant. If the global constant does not exist it is created. This method requires a test configuration file to be loaded, otherwise an exception is thrown. The changed test configuration is saved instantly.- Specified by:
setGlobalConstant
in interfaceComTestConfiguration
- Parameters:
name
- the name of the constant to be modifiedvalue
- the value to be assigned- Throws:
ETComException
- in case of a COM exception
-
getGlobalConstants
public ComConstants getGlobalConstants() throws ETComException
Description copied from interface:ComTestConfiguration
Queries all global constants of the currently loaded test configuration.- Specified by:
getGlobalConstants
in interfaceComTestConfiguration
- Returns:
- the global constants
- Throws:
ETComException
- in case of a COM exception
-
getFileName
public String getFileName() throws ETComException
Description copied from interface:ComTestConfiguration
Returns the full path of this test configuration.- Specified by:
getFileName
in interfaceComTestConfiguration
- Returns:
- the TCF file path
- Throws:
ETComException
- in case of a COM exception
-
-