com.ptc.windchill.uwgm.proesrv.request
Class PartRenameRequestTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
com.ptc.windchill.uwgm.test.util.AbstractUwgmTest
com.ptc.windchill.uwgm.proesrv.request.AbstractUwgmRequestTest
com.ptc.windchill.uwgm.proesrv.request.PartRenameRequestTest
- All Implemented Interfaces:
- junit.framework.Test, com.ptc.windchill.uwgm.test.util.UwgmTestConstants
- public class PartRenameRequestTest
- extends AbstractUwgmRequestTest
Test class for testing PartRenameRequest. It currently performs the following tests :
- testPartRenameRequest(): Creates 3 standalone WTParts, renames 2 WTParts
and renumbers 2 WTParts by creating and invoking a PartRename
request and then verifies that the parts were renamed/renumbered successfully.
- testPartAssemblyRename(): Similar to the above test except for the fact that here
instead of standalone parts, an assembly with a parent and two children is created.
Nested classes inherited from class com.ptc.windchill.uwgm.test.util.AbstractUwgmTest |
|
Fields inherited from class com.ptc.windchill.uwgm.test.util.AbstractUwgmTest |
|
Fields inherited from class junit.framework.TestCase |
|
Fields inherited from interface com.ptc.windchill.uwgm.test.util.UwgmTestConstants |
UWGM_CLIENT_CACHE_ID, UWGM_CLIENT_NAME, UWGM_CLIENT_VERSION, UWGM_TEST_ASSEMBLY_CHILDREN_NOS, UWGM_TEST_BOOLEAN, UWGM_TEST_DEFAULT_FOLDER_PATH, UWGM_TEST_DEFAULT_LIFECYCLE_NAME, UWGM_TEST_DEFAULT_LIFECYCLE_PROP_NAME, UWGM_TEST_DEFAULT_TEAMTEMPLATE_NAME, UWGM_TEST_DOC_NAME_PREFIX, UWGM_TEST_DOC_NOS, UWGM_TEST_FAMILY_INSTANCE_NOS, UWGM_TEST_FLOAT, UWGM_TEST_FOLDER_NAME_PREFIX, UWGM_TEST_GENERIC_NAME_PREFIX, UWGM_TEST_INSTANCE_NAME_PREFIX, UWGM_TEST_INTEGER, UWGM_TEST_PART_NAME_PREFIX, UWGM_TEST_PART_NOS, UWGM_TEST_PRODUCT1_NAME, UWGM_TEST_PROJECT1_NAME, UWGM_TEST_STRING, UWGM_TEST_WORKSPACE_NAME_PREFIX |
Methods inherited from class com.ptc.windchill.uwgm.proesrv.request.AbstractUwgmRequestTest |
createUwgmIterations, createUwgmIterations, createUwgmIterations, createUwgmWorkspace, createUwgmWorkspace, createUwgmWorkspace, getWorkspaceObjects, getWorkspaceObjectsMap, performUwgmRequestTest, printIterations, printWorkspace, setUp, verifyResponseMessages, verifyTransactionMessages |
Methods inherited from class com.ptc.windchill.uwgm.test.util.AbstractUwgmTest |
getTestResult, reportError, reportFailure, run |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, runBare, runTest, setName, tearDown, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
wsDataLoader
private com.ptc.windchill.uwgm.test.fixture.WorkspaceDataLoader wsDataLoader
masterToPartRenameData
private WTKeyedMap masterToPartRenameData
log
private static Log log
RENAME_TEST_PART_NOS
private static final int RENAME_TEST_PART_NOS
- See Also:
- Constant Field Values
nameChangeIndices
private static final List nameChangeIndices
numberChangeIndices
private static final List numberChangeIndices
RENAME_SUFFIX
private static final String RENAME_SUFFIX
- See Also:
- Constant Field Values
RENUMBER_SUFFIX
private static final String RENUMBER_SUFFIX
- See Also:
- Constant Field Values
PartRenameRequestTest
public PartRenameRequestTest()
PartRenameRequestTest
public PartRenameRequestTest(String methodName)
testPartRenameRequest
public void testPartRenameRequest()
throws Throwable
- Throws:
Throwable
testPartAssemblyRename
public void testPartAssemblyRename()
throws Throwable
- Throws:
Throwable
createRequests
protected com.ptc.windchill.uwgm.soap.uwgm.Request[] createRequests()
throws com.ptc.cipjava.jxthrowable,
WTException
- Specified by:
createRequests
in class AbstractUwgmRequestTest
- Throws:
com.ptc.cipjava.jxthrowable
WTException
printRequest
protected void printRequest(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest uwgmRequest,
int cnt)
- Overrides:
printRequest
in class AbstractUwgmRequestTest
verifySuccessMessage
protected void verifySuccessMessage(com.ptc.windchill.uwgm.soap.uwgm.Message msg)
throws WTException
- Overrides:
verifySuccessMessage
in class AbstractUwgmRequestTest
- Throws:
WTException
validateCreatedData
private void validateCreatedData(String methodName)
createPartRenameInstructions
private com.ptc.windchill.uwgm.soap.uwgmsvc.PartRenameInstruction.Iterator createPartRenameInstructions(WTPart[] testParts,
PartRenameRequestTest.PartRenameData[] partRenameData)
throws WTException
- Throws:
WTException
createPartRenameInstruction
private com.ptc.windchill.uwgm.soap.uwgmsvc.PartRenameInstruction createPartRenameInstruction(PartRenameRequestTest.PartRenameData partRenameData,
WTPart part)
throws WTException
- Throws:
WTException
refreshTestParts
private void refreshTestParts(WTPart[] testParts)
throws WTException
- Throws:
WTException
verifyPartMaster
private void verifyPartMaster(com.ptc.windchill.uwgm.soap.uwgmdb.PartMaster partMaster,
WTCollection wtMasters)
throws WTException
- Throws:
WTException
getWTPartMasters
private WTCollection getWTPartMasters(WTPart[] testParts)
getNewValue
private String getNewValue(String oldValue,
String suffix)
createPartRenameData
private PartRenameRequestTest.PartRenameData[] createPartRenameData(WTPart[] testParts)
suite
public static junit.framework.Test suite()
main
public static void main(String[] args)