Class DeleteOperationTest
- java.lang.Object
-
- com.boomi.connector.testutil.junit.ConnectorTest
-
- com.boomi.connector.testutil.junit.OperationTest
-
- com.boomi.connector.testutil.junit.DeleteOperationTest
-
public abstract class DeleteOperationTest extends OperationTest
Base test class for testingOperationType.DELETEoperations withConnectorTester.
-
-
Field Summary
-
Fields inherited from class com.boomi.connector.testutil.junit.OperationTest
EXPECTED_RESULT_COUNT
-
Fields inherited from class com.boomi.connector.testutil.junit.ConnectorTest
connectorTester, testContext
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDeleteOperationTest(String objectTypeId)Creates an instance of an operation test.protectedDeleteOperationTest(String objectTypeId, OptionalTestInput optionalTestInput)Creates an instance of an operation test.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected StringcreateTemporaryObjectForDeletion(InputStream input, String xpathToId)Helper method to create a new object and return its id.protected List<SimpleOperationResult>executeOperation()This method should perform the actual operation being testedprotected abstract StringgetObjectId()Abstraction to allow ids to be created as part of each test.-
Methods inherited from class com.boomi.connector.testutil.junit.OperationTest
afterOperation, afterOperation, prepareForOperation, testOperation
-
Methods inherited from class com.boomi.connector.testutil.junit.ConnectorTest
browseProfile, browseTypes, clearObjectDefinitionCache, getBrowseContext, getConnectorTestContext, getOperationContext, setupConnectorTester
-
-
-
-
Constructor Detail
-
DeleteOperationTest
protected DeleteOperationTest(String objectTypeId)
Creates an instance of an operation test.Intended to be used as part of a
Parameterizedtest but can be run as a single test instance by invoking this constructor from the no argument constructor of the implementing class.- Parameters:
objectTypeId- object type id under test
-
DeleteOperationTest
protected DeleteOperationTest(String objectTypeId, OptionalTestInput optionalTestInput)
Creates an instance of an operation test.Intended to be used as part of a
Parameterizedtest but can be run as a single test instance by invoking this constructor from the no argument constructor of the implementing class.- Parameters:
objectTypeId- object type id under testoptionalTestInput- optional input for the test
-
-
Method Detail
-
executeOperation
protected List<SimpleOperationResult> executeOperation()
Description copied from class:OperationTestThis method should perform the actual operation being tested- Specified by:
executeOperationin classOperationTest- Returns:
ListofSimpleOperationResultrepresenting the result of the operation
-
createTemporaryObjectForDeletion
protected final String createTemporaryObjectForDeletion(InputStream input, String xpathToId)
Helper method to create a new object and return its id.Currently only supports create operations that return an xml payload containing the id
- Parameters:
input- input for the create operationxpathToId- xpath expression for the id in the response xml of the create operation- Returns:
- the id of the newly created object
-
getObjectId
protected abstract String getObjectId()
Abstraction to allow ids to be created as part of each test.This must be overridden to return the id for the current object
- Returns:
- the id of the object to be deleted
-
-