Package com.e1c.g5.v8.dt.testing.check
Class CheckTestBase
java.lang.Object
com.e1c.g5.v8.dt.testing.check.CheckTestBase
- Direct Known Subclasses:
CheckTemplateTest,SingleProjectReadOnlyCheckTestBase
Base implementation for the check tests
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanCleanup flag definitionprotected ObjectextractMarkerContainerId(Object objectIdOrObject) protected StringgetCheckIdFromMarker(Marker marker, IDtProject project) Gets the check identifier from the markerprotected StringgetCheckIdFromMarker(String shortUid, org.eclipse.core.resources.IProject project) Gets the check identifier from the marker's short UIDprotected MarkergetFirstMarker(String checkId, Object objectIdOrObject, IDtProject project) Gets the first matching marker from the objectprotected MarkergetFirstNestedMarker(String checkId, Object objectIdOrObject, IDtProject project) Gets the first matching marker from the object or its containments/referncesgetMarkersByCheckIds(Set<String> checkIds, Object objectIdOrObject, IDtProject project) Gets the collection of markers from the object by selected checkIdsgetMarkersByCheckIds(Set<String> checkIds, Object sourceObject, IDtProject project, Marker[] markers) Gets the collection of markers from the markers array by selected checkIdsgetMarkersByCheckIds(Set<String> checkIds, Object sourceObject, org.eclipse.core.resources.IProject project, Marker[] markers) Gets the collection of markers from the markers array by selected checkIdsprotected MdObjectgetMdObjectByFqn(String fqn, IDtProject dtProject) Gets the MD object by its FQN and projectprotected IBmObjectgetTopObjectByFqn(String fqn, IDtProject dtProject) protected LonggetTopObjectIdByFqn(String fqn, IDtProject dtProject) protected IDtProjectopenProjectAndWaitForValidationFinish(String configurationName) Imports the test EDT project from the standard test location and waits until all validation operations are finishedprotected voidwaitForDD(IDtProject project)
-
Field Details
-
RESOURCES_CHANGE_WAIT_TIME
-
testingWorkspace
-
markerManager
-
bmModelManager
-
dtProjectManager
-
orchestrator
-
checkRepository
-
derivedDataManagerProvider
-
-
Constructor Details
-
CheckTestBase
public CheckTestBase()
-
-
Method Details
-
enableCleanUp
protected boolean enableCleanUp()Cleanup flag definition- Returns:
- True if the WS should be cleaned after each test
-
getCheckIdFromMarker
Gets the check identifier from the marker- Parameters:
marker- The marker to get check identifier from. May not benullproject- The target project. May not benull- Returns:
- The identifier of the check. May not be
null
-
getCheckIdFromMarker
Gets the check identifier from the marker's short UID- Parameters:
marker- The marker to get check identifier from. May not benullproject- The target project. May not benull- Returns:
- The identifier of the check. May not be
null
-
getFirstMarker
Gets the first matching marker from the object- Parameters:
checkId- The indentifier of the check. May not benullobjectIdOrObject- The object identifier. Accepts BM ids (Long), URI's of modules, URI of module in the form of String, or IBmObject directly. May not benullproject- The target project to get markers for. May not benull- Returns:
- The found marker if any.
nullotherwise
-
getMarkersByCheckIds
protected List<Marker> getMarkersByCheckIds(Set<String> checkIds, Object objectIdOrObject, IDtProject project) Gets the collection of markers from the object by selected checkIds- Parameters:
checkIds- The set of the check indentifiers, cannot benull, cannot be emptyobjectIdOrObject- The object identifier. Accepts BM ids (Long), URI's of modules, URI of module in the form of String, or IBmObject directly. May not benullproject- The target project to get markers for. May not benull- Returns:
- The found markers if any. Empty collection otherwise
-
getFirstNestedMarker
Gets the first matching marker from the object or its containments/refernces- Parameters:
checkId- The indentifier of the check. May not benullobjectIdOrObject- The object identifier. Accepts BM ids (Long), URI's of modules, URI of module in the form of String, or IBmObject directly. May not benullproject- The target project to get markers for. May not benull- Returns:
- The found marker if any.
nullotherwise
-
getTopObjectByFqn
-
getTopObjectIdByFqn
-
openProjectAndWaitForValidationFinish
protected IDtProject openProjectAndWaitForValidationFinish(String configurationName) throws org.eclipse.core.runtime.CoreException Imports the test EDT project from the standard test location and waits until all validation operations are finished- Parameters:
configurationName- The name of the test configuration. Should match the sub-folder name of the 'workspaces' folder- Returns:
- The opened
IDtProjectproject handle. May not benull - Throws:
org.eclipse.core.runtime.CoreException- In case of improper project start
-
waitForDD
-
extractMarkerContainerId
-
getMarkersByCheckIds
protected List<Marker> getMarkersByCheckIds(Set<String> checkIds, Object sourceObject, org.eclipse.core.resources.IProject project, Marker[] markers) Gets the collection of markers from the markers array by selected checkIds- Parameters:
checkIds- The set of the check indentifiers, cannot benull, cannot be emptysourceObject- The object identifier. Accepts BM ids (Long), URI's of modules, URI of module in the form of String, or IBmObject directly. May not benullproject- The target project to get markers for. May not benullmarkers- The markers array. May not benull- Returns:
- The found markers if any. Empty collection otherwise
-
getMarkersByCheckIds
protected List<Marker> getMarkersByCheckIds(Set<String> checkIds, Object sourceObject, IDtProject project, Marker[] markers) Gets the collection of markers from the markers array by selected checkIds- Parameters:
checkIds- The set of the check indentifiers, cannot benull, cannot be emptysourceObject- The object identifier. Accepts BM ids (Long), URI's of modules, URI of module in the form of String, or IBmObject directly. May not benullproject- The target DT project to get markers for. May not benullmarkers- The markers array. May not benull- Returns:
- The found markers if any. Empty collection otherwise
-
getMdObjectByFqn
Gets the MD object by its FQN and project- Parameters:
fqn- the FQN, cannot benulldtProject- the projectcannot benull- Returns:
- The found MD object, can be
null
-